{"action":"opened","issue":{"url":"https://api.github.com/repos/googleapis/google-cloud-python/issues/6383","repository_url":"https://api.github.com/repos/googleapis/google-cloud-python","labels_url":"https://api.github.com/repos/googleapis/google-cloud-python/issues/6383/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/google-cloud-python/issues/6383/comments","events_url":"https://api.github.com/repos/googleapis/google-cloud-python/issues/6383/events","html_url":"https://github.com/googleapis/google-cloud-python/issues/6383","id":377198847,"node_id":"MDU6SXNzdWUzNzcxOTg4NDc=","number":6383,"title":"BigQuery - table schema update is misordening the fields","user":{"login":"bgbraga","id":4409701,"node_id":"MDQ6VXNlcjQ0MDk3MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4409701?v=4","gravatar_id":"","url":"https://api.github.com/users/bgbraga","html_url":"https://github.com/bgbraga","followers_url":"https://api.github.com/users/bgbraga/followers","following_url":"https://api.github.com/users/bgbraga/following{/other_user}","gists_url":"https://api.github.com/users/bgbraga/gists{/gist_id}","starred_url":"https://api.github.com/users/bgbraga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgbraga/subscriptions","organizations_url":"https://api.github.com/users/bgbraga/orgs","repos_url":"https://api.github.com/users/bgbraga/repos","events_url":"https://api.github.com/users/bgbraga/events{/privacy}","received_events_url":"https://api.github.com/users/bgbraga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-04T21:52:26Z","updated_at":"2018-11-04T21:52:26Z","closed_at":null,"author_association":"NONE","body":"python 3.7.1\r\ngoogle-cloud-bigquery 1.6.0\r\ntested os: mac and windows\r\n\r\nSteps to reproduce:\r\n1) insert or load data1.json and data1_schema.json\r\n2) it will create a table like data1_schema.jpg\r\n3) insert or load data2.json with schema update data2_schema.json\r\n4) it will update the table like data2_schema.jpg\r\n5) compare data2_schema.json and data2_schema.jpg. They should be equal but are different. Table update misorder the fields. Phone field should be appear after last_name.\r\n\r\nI used google-cloud-bigquery 1.6.0 for table update. Tested with method update_table or load_table_from_uri + jobconfig. Same problem in both.\r\n\r\n![data1_schema](https://user-images.githubusercontent.com/4409701/47970283-7c37ff80-e06a-11e8-822c-06b4d607ad79.jpg)\r\n![data2_schema](https://user-images.githubusercontent.com/4409701/47970284-7cd09600-e06a-11e8-9a9d-aef833027c38.jpg)\r\n[data1.json.txt](https://github.com/googleapis/google-cloud-python/files/2546353/data1.json.txt)\r\n[data2.json.txt](https://github.com/googleapis/google-cloud-python/files/2546354/data2.json.txt)\r\n[data1_schema.json.txt](https://github.com/googleapis/google-cloud-python/files/2546355/data1_schema.json.txt)\r\n[data2_schema.json.txt](https://github.com/googleapis/google-cloud-python/files/2546356/data2_schema.json.txt)\r\n\r\n"}}
{"actor":{"display_login":"bgbraga"}}