def load_table(bigquery, project_id, dataset_id, table_name, source_schema, source_path, num_retries=5):
 job_data = {'jobReference': {'projectId': project_id, 'jobId': str(uuid.uuid4())}, 'configuration': {'load': {'sourceUris': [source_path], 'schema': {'fields': source_schema}, 'destinationTable': {'projectId': project_id, 'datasetId': dataset_id, 'tableId': table_name}}}}
 return bigquery.jobs().insert(projectId=project_id, body=job_data).execute(num_retries=num_retries)

def load_table ( bigquery , project_id , dataset_id , table_name , source_schema , source_path , num_retries = 5 ) : job_data = { 'jobReference' : { 'projectId' : project_id , 'jobId' : str ( uuid . uuid4 ( ) ) } , 'configuration' : { 'load' : { 'sourceUris' : [ source_path ] , 'schema' : { 'fields' : source_schema } , 'destinationTable' : { 'projectId' : project_id , 'datasetId' : dataset_id , 'tableId' : table_name } } } } return bigquery . jobs ( ) . insert ( projectId = project_id , body = job_data ) . execute ( num_retries = num_retries )
starts a job to load a bigquery table from csv args: bigquery: an initialized and authorized bigquery client google-api-client object source_schema: a valid bigquery schema .