Refactor From to be more friendly for external tables