From bcdd7c83da9d771cdb4e07ca5e291c83fed4ca47 Mon Sep 17 00:00:00 2001 From: Katsuhiko YOSHIDA Date: Fri, 4 May 2018 03:27:59 +0900 Subject: [PATCH] Replace project id with dataset --- redash/query_runner/big_query.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redash/query_runner/big_query.py b/redash/query_runner/big_query.py index f765978585..f862a92d5b 100644 --- a/redash/query_runner/big_query.py +++ b/redash/query_runner/big_query.py @@ -231,7 +231,10 @@ def get_schema(self, get_stats=False): columns.append(u"{}.{}".format(column['name'], field['name'])) else: columns.append(column['name']) - schema.append({'name': table_data['id'], 'columns': columns}) + + table_reference = table_data['tableReference'] + table_name = "{}.{}".format(table_reference['datasetId'], table_reference['tableId']) + schema.append({'name': table_name, 'columns': columns}) return schema