use plato; insert into Output select key, value, TablePath() from Input flatten by (key) ;