added the function and the template view for bigquery