Parent Child Levels with Workflow

I have a table “ParentChild” with columns (MyId, MyParentId)

Sample Data

A1, Null

A2, A1

A3, A1

A4, A2

A5, A2

A6, A4

A7, A5

I want a Knime work flow that creates another column “Level”. This should show the Level of the ID

In above Data A1 should be at Level 0, A2 and A3 should be at Level 1, A4 should be at Level 2 and so on.

Can some one help how to achieve this with workflow in Knime?