How to build a data table from the list of retrieved records using Query Entity Records (Data Service activity)?

Please see this sample from Karan which converts the List returned from Data Service to a Data Table - Export data service list into a excel sheeet - #4 by Karan

He is also writing the data to Excel but you can ignore that part.