You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "readAndUploadFacebookReport.py", line 135, in <module>
main()
File "readAndUploadFacebookReport.py", line 128, in main
load_transformed_data_to_bq('fbschema.json', transform_filename)
File "readAndUploadFacebookReport.py", line 83, in load_transformed_data_to_bq
job = table.upload_from_file(readable, source_format='text/csv', skip_leading_rows=1)
File "/usr/local/lib/python2.7/site-packages/gcloud/bigquery/table.py", line 913, in upload_from_file
return client.job_from_resource(json.loads(response_content))
File "/usr/local/lib/python2.7/site-packages/gcloud/bigquery/client.py", line 119, in job_from_resource
config = resource['configuration']
KeyError: 'configuration'
Steps to reproduce
Tried pushing data into an existing table on BQ using table.upload_from_file on a csv file with proper schema and other configurations. Code breaks on that line as well.
Code example
with open(filepath, 'rb') as readable:
job = table.upload_from_file(readable, source_format='text/csv', skip_leading_rows=1, write_disposition="WRITE_APPEND")
python --version: Python 2.7.12pip show google-cloud,pip show google-<service>orpip freezetable.upload_from_fileon a csv file with proper schema and other configurations. Code breaks on that line as well.