[BAEL-3634] Code for Spark DataFrame article (#12039)

* [BAEL-3634] Code for Spark DataFrame article

* [BAEL-3634] Improve example data sample and sort aggregations

* [BAEL-3634] change column name for clarity

* [BAEL-3634] Update method name with  U.S english standard

Co-authored-by: uzma khan <[email protected]>
This commit is contained in:
ukhan1980
2022-05-03 20:47:17 +01:00
committed by GitHub
co-authored by uzma khan
parent 744f71356b
commit 728b3c9132
17 changed files with 686 additions and 6 deletions
+9
View File
@@ -0,0 +1,9 @@
id,zoneId,FIRST_NAME,MIDDLE_NAME,LAST_NAME,CITY,gender,transaction_date,transaction_amount
1,EU11,Ana1,A,MN, London,Female,1/2/2018,5200
2,EU12,Ana2,A,MN, London,Female,29/3/2018,1000
3,EU13,Jack1,Josh,MN, London,Male,19/6/2018,9600
4,EU14,Jack2,Josh,MN, London,Male,9/9/2018,1000
5,EU15,Nick1,H,Dee,London,Male,9/6/2021,3000
6,EU16,Nick2,H,Dee,London,Male,27/9/2021,500
7,EU17,Nick3,H,Dee,London,Male,8/12/2021,500
8,EU18,Sara1,H,Dee,London,Female,7/4/2021,2000
1 id zoneId FIRST_NAME MIDDLE_NAME LAST_NAME CITY gender transaction_date transaction_amount
2 1 EU11 Ana1 A MN London Female 1/2/2018 5200
3 2 EU12 Ana2 A MN London Female 29/3/2018 1000
4 3 EU13 Jack1 Josh MN London Male 19/6/2018 9600
5 4 EU14 Jack2 Josh MN London Male 9/9/2018 1000
6 5 EU15 Nick1 H Dee London Male 9/6/2021 3000
7 6 EU16 Nick2 H Dee London Male 27/9/2021 500
8 7 EU17 Nick3 H Dee London Male 8/12/2021 500
9 8 EU18 Sara1 H Dee London Female 7/4/2021 2000
+114
View File
@@ -0,0 +1,114 @@
[
{
"zoneId": "LONDON",
"customerId": 1,
"gender": "Female",
"name": "jane austin",
"contact": {
"street_Address": "XYZ Road",
"address2": "house 47",
"zipcode": "MK1110",
"county": "DCounty",
"phone_number": "(919) 403-0025",
"customer_city": "CityA"
},
"transaction_date": "2021-02-05",
"transaction_amount": 15000
},
{
"zoneId": "LONDON",
"customerId": 2,
"gender": "Male",
"name": "Jack Trevor",
"contact": {
"street_Address": " kingfisher road",
"address2": "SUITE 110",
"zipcode": "HM1190",
"county": "CCounty",
"phone_number": "(919) 403-0025",
"customer_city": "CityB"
},
"transaction_date": "2021-02-05",
"transaction_amount": 12000
},
{
"zoneId": "LONDON",
"customerId": 11,
"gender": "Female",
"name": "jane1 austin",
"contact": {
"street_Address": "B Road",
"address2": "house 47",
"zipcode": "MK1110",
"county": "BCounty",
"phone_number": "(919) 403-0025",
"customer_city": "CityA"
},
"transaction_date": "2021-02-05",
"transaction_amount": 1000
},
{
"zoneId": "LONDON",
"customerId": 21,
"gender": "Male",
"name": "Jack1 Trevor",
"contact": {
"street_Address": " A road",
"address2": "SUITE 777",
"zipcode": "AZ890",
"county": "ACounty",
"phone_number": "(919) 403-0025",
"customer_city": "CityB"
},
"transaction_date": "2021-02-05",
"transaction_amount": 1000
},
{
"zoneId": "Wales",
"customerId": 3,
"gender": "Male",
"name": "John Jack",
"contact": {
"street_Address": "sunny croft",
"address2": "SUITE 1",
"zipcode": "SN1030",
"county": "bucks",
"phone_number": "(919) 403-0025",
"customer_city": "Cardiff"
},
"transaction_date": "2018-02-05",
"transaction_amount": 5000
},
{
"zoneId": "LONDON",
"customerId": 4,
"gender": "Male",
"name": "Jack Trevor",
"contact": {
"street_Address": " kingfisher road",
"address2": "SUITE 110",
"zipcode": "HM1190",
"county": "Hampshire",
"phone_number": "(919) 403-0025",
"customer_city": "CityB"
},
"transaction_date": "2021-02-05",
"transaction_amount": 500
},
{
"zoneId": "Wales",
"customerId": 5,
"gender": "Male",
"name": "John Jack",
"contact": {
"street_Address": "sunny croft",
"address2": "SUITE 1",
"zipcode": "SN1030",
"county": "ECounty",
"phone_number": "(919) 403-0025",
"customer_city": "Cardiff"
},
"transaction_date": "2018-01-25",
"transaction_amount": 500
}
]
+20
View File
@@ -0,0 +1,20 @@
[
{
"id": "1",
"gender": "Female",
"name": "Jo",
"transaction_amount": 200
},
{
"id":"2",
"gender": "Male",
"name": "Mike",
"transaction_amount": 500
},
{
"id": "3",
"gender": "Male",
"name": "Dave",
"transaction_amount": 5000
}
]