hexpop.py
def bq_create_view(dataset, view_id, view_query, force_new=False):
    """Create BigQuery view forcefully if required."""
    client = bq_client()
    view_id = '.'.join([dataset.project, dataset.dataset_id, view_id])
    if force_new:
        client.delete_table(view_id, not_found_ok=True)  # clean slate
    view = bigquery.Table(view_id)
    view.view_query = view_query
    try:
        return client.create_table(view)
    except Conflict:
        return client.get_table(view)
Create BigQuery view forcefully if required.
Create BigQuery view forcefully if required.
Create BigQuery view forcefully if required .
def bq_create_view(dataset, view_id, view_query, force_new=False):
    client = bq_client()
    view_id = '.'.join([dataset.project, dataset.dataset_id, view_id])
    if force_new:
        client.delete_table(view_id, not_found_ok=True)  
    view = bigquery.Table(view_id)
    view.view_query = view_query
    try:
        return client.create_table(view)
    except Conflict:
        return client.get_table(view)
def bq_create_view ( dataset , view_id , view_query , force_new = False ) : client = bq_client ( ) view_id = '.' . join ( [ dataset . project , dataset . dataset_id , view_id ] ) if force_new : client . delete_table ( view_id , not_found_ok = True ) view = bigquery . Table ( view_id ) view . view_query = view_query try : return client . create_table ( view ) except Conflict : return client . get_table ( view )
Create BigQuery view forcefully if required.
Create BigQuery view forcefully if required .
"""Create BigQuery view forcefully if required.""" # clean slate
dataset
view_id
view_query
force_new