BigQuery API:: Able to insert CSV data but data reflection in BigQuery is untimely
Question: Using python script for `Google app engine` to upload `CSV data` into
`Bigquery`. Coded using `PyDev` perspective of `Eclipse on Windows 7`.

The `insert` is successful but inside BigQuery sometimes the data gets
inserted immediately and sometimes it takes hours to reflect.

    
    
    j={
    'kind': 'bigquery#insertRequest',
    'jobReference': {'projectId': '#######'},
    'configuration': {
        'load': {
    
            'sourceFormat': 'CSV',
            'destinationTable': {'projectId': '############',
                                 'tableId': '###########',
                                 'datasetId': '##########'},
    
            'allowJaggedRows': True,
    
            'sourceUris': ['gs://bucket_naem/file_name'],
            'skipLeadingRows': 1,
            'schema': {'fields': [
                                   {'type':'Data_Type','name':'Col1_name'},
                                   {'type':'Data_Type','name':'Col2_name'}
    
                                 ]
                       },
            },
        },
    }
    
    
    response = service.jobs().insert(projectId = "##########",body = j).execute()
    


Answer: A BigQuery load job is asynchronous, which is why it returns immediately.
After the insert() call returns, it will give you a job id. You can then use
that job id to look up the state of your job. Once that job completes
successfully, your data should be immediately available.

If an import takes hours, that is unexpected (unless you are importing a
massive amount of data); if that is the case, please provide a job id and we
(BigQuery engineers) can look up what happened in the logs.

