Refractor methods and models so they are compatible with both bigquery and SQL-like supported drivers.