Ability to query origin and destination tables

start of #143