-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apurva Shukla- Module 5 #89
base: main
Are you sure you want to change the base?
Conversation
Module 5/Problem 1/problem1.json
Outdated
"address": "=concat(@(1,address.street),' ',@(1,address.city), ' ', @(1,address.state), ' ',@(1,address.zip))", | ||
"fullname": "=concat(@(1,firstName),' ',@(1,lastName))" | ||
}, | ||
"itemTemp": "@(1,items)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be easily done without creating a duplicate of the 'items' list. Please optimize this.
Module 5/Problem 5/problem5.json
Outdated
"email": "email", | ||
"address": { | ||
"city": "city", | ||
"zip": "zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use & here for all RHS values?
Module 5/Problem 6/problem6.json
Outdated
"name": "[#2].Name", | ||
"hobbies": { | ||
"*": { | ||
"name": "[#4].Hobbies" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
& is preferred over # to define levels.
Module 5/Problem 8/problem8.json
Outdated
"employees": { | ||
"[0]": { | ||
"bonus": 1000, | ||
"tempBonus": 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be optimized. No need to create a bonus duplicate.
Module 5/Problem 10/problem10.json
Outdated
"spec": { | ||
"fullname": "=split(' ',@(2,name))", | ||
"first_name": "=firstElement(@(2,fullname))", | ||
"last_name": "=lastElement(@(2,fullname))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is giving the desired output but 2 is not the correct level here. Please check.
Module 5/Problem 12/problem12.json
Outdated
"employee": { | ||
"name": "&", | ||
"address": "&", | ||
"phones": "&" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the output.
Module 5/Problem 14/problem14.json
Outdated
"*": { | ||
"id": "employees.[#2].&", | ||
"name": "employees.[#2].&", | ||
"department": "employees[#2].&", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of wildcards is recommended over manually writing fields. Need to correct this in many other places.
Module 5/Problem 15/problem15.json
Outdated
} | ||
}, | ||
{ | ||
"operation": "sort" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to sort.
Module 5/Problem 29/problem29.json
Outdated
"spec": { | ||
"*": "&", | ||
"person-address": { | ||
"*": "person-address-&" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reduce the number of operations.
Module 5/Problem 30/problem30.json
Outdated
"operation": "shift", | ||
"spec": { | ||
"employee": { | ||
"name": "&", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect
Module 5/Problem 33/problem33.json
Outdated
"*": { | ||
"id": "@(3,id)", | ||
"hobby_name": "@(1,name)", | ||
"hobby_level": "@(1,level)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be more optimized. Please check.
Module 5/Problem 27/problem27.json
Outdated
"Country": "Canada" | ||
}, | ||
"[2]": { | ||
"Country": "NA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indexing is hard coded. Make sure your spec is always loosely written, so that even if there are more fields you don't have to change the approach.
}, | ||
"[2]": { | ||
"bonus": 900, | ||
"tempBonus": 900 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this, the bonus is related to the department in some way. You can add that approach also.
Completed: Module 5
Solved all 34 problems
Learnt the following things in the module about Jolt: