I would like to draw a data manipulation piepeline made of 2 steps:
- group by isbn
- aggregate by author_name
I tried to use nested rectangles and it almost works. The problem is that the rectangles are not aligned.
Here is my plantuml source code:
@startuml
skinparam componentStyle rectangle
[group by **isbn**] as groupby
rectangle "Input" as input {
component book1 [
**title** 7 Habits of Highly Effective People
**isbn** 978-1982137274
**author_name** Sean Covey
]
component book2 [
**title** 7 Habits of Highly Effective People
**isbn** 978-1982137274
**author_name** Stephen Covey
]
component book3 [
**title** The Power of Habit
**isbn** 978-0812981605
**author_name** Charles Duhigg
]
}
rectangle "Intermediate" as intermediate {
rectangle "978-1982137274" as 7habits {
component book11 [
**title** 7 Habits of Highly Effective People
**isbn** 978-1982137274
**author_name** Sean Covey
]
component book12 [
**title** 7 Habits of Highly Effective People
**isbn** 978-1982137274
**author_name** Stephen Covey
]
book11 -[hidden]d- book12
}
rectangle "978-0812981605" as power {
component book13 [
**title** The Power of Habit
**isbn** 978-0812981605
**author_name** Charles Duhigg
]
}
}
[aggregate by **author_name**] as agg
rectangle "Output" as output {
component book111 [
**title** 7 Habits of Highly Effective People
**isbn** 978-1982137274
**authorNames** [Sean Covey, Stephen Covey]
]
component book121 [
**title** The Power of Habit
**isbn** 978-0812981605
**authorNames** [Charles Duhigg]
]
}
input -d-> groupby
groupby -d-> intermediate
intermediate -d-> agg
agg -d-> output
@enduml
An image of the result can be see in this URL.
Please advise.