flat map with data join