{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-superset/issues/4399","repository_url":"https://api.github.com/repos/apache/incubator-superset","labels_url":"https://api.github.com/repos/apache/incubator-superset/issues/4399/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-superset/issues/4399/comments","events_url":"https://api.github.com/repos/apache/incubator-superset/issues/4399/events","html_url":"https://github.com/apache/incubator-superset/issues/4399","id":296125191,"number":4399,"title":"bigquery and sqllab  - table dropdown generates an error","user":{"login":"darylerwin","id":25016569,"avatar_url":"https://avatars2.githubusercontent.com/u/25016569?v=4","gravatar_id":"","url":"https://api.github.com/users/darylerwin","html_url":"https://github.com/darylerwin","followers_url":"https://api.github.com/users/darylerwin/followers","following_url":"https://api.github.com/users/darylerwin/following{/other_user}","gists_url":"https://api.github.com/users/darylerwin/gists{/gist_id}","starred_url":"https://api.github.com/users/darylerwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darylerwin/subscriptions","organizations_url":"https://api.github.com/users/darylerwin/orgs","repos_url":"https://api.github.com/users/darylerwin/repos","events_url":"https://api.github.com/users/darylerwin/events{/privacy}","received_events_url":"https://api.github.com/users/darylerwin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-10T19:12:05Z","updated_at":"2018-02-11T04:31:29Z","closed_at":"2018-02-10T23:09:29Z","author_association":"NONE","body":"Make sure these boxes are checked before submitting your issue - thank you!\r\n\r\n- [x ] I have checked the superset logs for python stacktraces and included it here as text if any\r\n- [ x] I have reproduced the issue with at least the latest released version of superset\r\n- [ x] I have checked the issue tracker for the same issue and I haven't found one similar\r\n\r\n\r\n### Superset version\r\nvery latest including the updated \r\nlib/python2.7/site-packages/superset/db_engine_specs.py\r\n\r\n### Expected results\r\nList of tables ..\r\n\r\n### Actual results\r\nAfter selecting the \"schema\" it tries to query the tables and the gui comes back and shows\r\nError while fetching table list.\r\n\r\nThe log shows:\r\n```\r\n2018-02-10 19:09:21,610:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/\r\n2018-02-10 19:09:21,620:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)\r\n2018-02-10 19:09:21,622:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token\r\n2018-02-10 19:09:21,627:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com\r\n2018-02-10 19:09:21,696:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 \"POST /o/oauth2/token HTTP/1.1\" 200 None\r\n2018-02-10 19:09:21,700:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com\r\n2018-02-10 19:09:21,804:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 \"GET /bigquery/v2/projects/production-bigdata/datasets HTTP/1.1\" 200 None\r\n2018-02-10 19:09:21,805:ERROR:root:dataset must be a Dataset or a DatasetReference\r\nTraceback (most recent call last):\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/superset/views/base.py\", line 62, in wraps\r\n    return f(self, *args, **kwargs)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py\", line 52, in wraps\r\n    return f(self, *args, **kwargs)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/superset/views/core.py\", line 1335, in tables\r\n    database, database.all_table_names(schema), schema)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/superset/models/core.py\", line 724, in all_table_names\r\n    self.db_engine_spec.get_table_names(schema, self.inspector))\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/superset/db_engine_specs.py\", line 225, in get_table_names\r\n    \r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py\", line 201, in get_table_names\r\n    self.bind, schema, info_cache=self.info_cache)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/pybigquery/sqlalchemy_bigquery.py\", line 192, in get_table_names\r\n    tables = connection.connection._client.list_dataset_tables(d)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/google/cloud/bigquery/client.py\", line 459, in list_dataset_tables\r\n    return self.list_tables(*args, **kwargs)\r\n  File \"/home/derwin/venv/local/lib/python2.7/site-packages/google/cloud/bigquery/client.py\", line 438, in list_tables\r\n    raise TypeError('dataset must be a Dataset or a DatasetReference')\r\nTypeError: dataset must be a Dataset or a DatasetReference\r\n```\r\n\r\n### Steps to reproduce\r\nSelect SQLLab\r\nSelect BigQuery for Database \r\nSelect one of the Schemas it finds (datasets).\r\nThen the error..\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/incubator-superset/issues/comments/364720437","html_url":"https://github.com/apache/incubator-superset/issues/4399#issuecomment-364720437","issue_url":"https://api.github.com/repos/apache/incubator-superset/issues/4399","id":364720437,"user":{"login":"darylerwin","id":25016569,"avatar_url":"https://avatars2.githubusercontent.com/u/25016569?v=4","gravatar_id":"","url":"https://api.github.com/users/darylerwin","html_url":"https://github.com/darylerwin","followers_url":"https://api.github.com/users/darylerwin/followers","following_url":"https://api.github.com/users/darylerwin/following{/other_user}","gists_url":"https://api.github.com/users/darylerwin/gists{/gist_id}","starred_url":"https://api.github.com/users/darylerwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darylerwin/subscriptions","organizations_url":"https://api.github.com/users/darylerwin/orgs","repos_url":"https://api.github.com/users/darylerwin/repos","events_url":"https://api.github.com/users/darylerwin/events{/privacy}","received_events_url":"https://api.github.com/users/darylerwin/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T04:31:29Z","updated_at":"2018-02-11T04:31:29Z","author_association":"NONE","body":"Proposed fix noted over on pybigquery github.\r\n\r\n```\r\n#        tables = connection.connection._client.list_tables(d)\r\n          tables = connection.connection._client.list_tables(connection.connection._client.dataset(d.dataset_id))\r\n```"}}
{"actor":{"display_login":"darylerwin"}}