get type from the sub view in the SQL generator