Title: Calling 'job.begin' on job returned from 'Table.upload_from_file' raises a 400 · Issue #2133 · googleapis/google-cloud-python · GitHub
Open Graph Title: Calling 'job.begin' on job returned from 'Table.upload_from_file' raises a 400 · Issue #2133 · googleapis/google-cloud-python
X Title: Calling 'job.begin' on job returned from 'Table.upload_from_file' raises a 400 · Issue #2133 · googleapis/google-cloud-python
Description: Trying to load data into bigquery with upload_from_file returns a 400. Sample code: def load_data_from_file(dataset_name, table_name, source_file_name): bigquery_client = bigquery.Client() dataset = bigquery_client.dataset(dataset_name) ...
Open Graph Description: Trying to load data into bigquery with upload_from_file returns a 400. Sample code: def load_data_from_file(dataset_name, table_name, source_file_name): bigquery_client = bigquery.Client() dataset ...
X Description: Trying to load data into bigquery with upload_from_file returns a 400. Sample code: def load_data_from_file(dataset_name, table_name, source_file_name): bigquery_client = bigquery.Client() dataset ...
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/2133
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Calling 'job.begin' on job returned from 'Table.upload_from_file' raises a 400","articleBody":"Trying to load data into bigquery with `upload_from_file` returns a 400.\n\nSample code:\n\n``` python\ndef load_data_from_file(dataset_name, table_name, source_file_name):\n bigquery_client = bigquery.Client()\n dataset = bigquery_client.dataset(dataset_name)\n table = dataset.table(table_name)\n\n # Reload the table to get the schema.\n table.reload()\n\n with open(source_file_name, 'rb') as source_file:\n # This example uses CSV, but you can use other formats.\n # See https://cloud.google.com/bigquery/loading-data\n job = table.upload_from_file(\n source_file, source_format='text/csv')\n\n job.begin()\n\n wait_for_job(job)\n\n print('Loaded {} rows into {}:{}.'.format(\n job.output_rows, dataset_name, table_name))\n```\n\nError:\n\n```\nTraceback (most recent call last):\n File \"load_data_from_file.py\", line 77, in \u003cmodule>\n args.source_file_anme)\n File \"load_data_from_file.py\", line 45, in load_data_from_file\n job.begin()\n File \"/Users/jonwayne/workspace/python-docs-samples/bigquery/cloud-client/env/lib/python3.4/site-packages/gcloud/bigquery/job.py\", line 364, in begin\n method='POST', path=path, data=self._build_resource())\n File \"/Users/jonwayne/workspace/python-docs-samples/bigquery/cloud-client/env/lib/python3.4/site-packages/gcloud/connection.py\", line 347, in api_request\n error_info=method + ' ' + url)\ngcloud.exceptions.BadRequest: 400 Load configuration must specify at least one source URI (POST https://www.googleapis.com/bigquery/v2/projects/python-docs-samples-tests/jobs)\n```\n","author":{"url":"https://github.com/theacodes","@type":"Person","name":"theacodes"},"datePublished":"2016-08-18T21:00:36Z","url":"https://github.com/googleapis/google-cloud-python/issues/2133"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dba778e1-336b-25a5-1a54-546282f7bb54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C52E:2EDB3C:5A1CB:7BE10:6AFE1007 |
| html-safe-nonce | 534b7e8d771ab24f908506fe033dcff2075cae69910029b8232b2d25aa3561b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTJFOjJFREIzQzo1QTFDQjo3QkUxMDo2QUZFMTAwNyIsInZpc2l0b3JfaWQiOiIxOTU0NzkwMTM5NjI4NDkwNzU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3d3bf494122bb5fa52e1e7edbf266fe8c3acd52e8c25c9004b54f7de8595cce3 |
| hovercard-subject-tag | issue:171999698 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/2133/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0f35c720ce743f0d2928b96b6a338d6ac00170db7b8fd83a454838b2281ea2aa/googleapis/google-cloud-python/issues/2133 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0f35c720ce743f0d2928b96b6a338d6ac00170db7b8fd83a454838b2281ea2aa/googleapis/google-cloud-python/issues/2133 |
| og:image:alt | Trying to load data into bigquery with upload_from_file returns a 400. Sample code: def load_data_from_file(dataset_name, table_name, source_file_name): bigquery_client = bigquery.Client() dataset ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theacodes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1fd4053be37b4bd545b4f38f1cecad058c343776acf2cbc6806316f26270e55e |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 635a57b3d0df6bc21c0f39fc7078888fb90e4066 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width