File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ def get_schema(self, get_stats=False):
304304 datasets = self ._get_project_datasets (project_id )
305305
306306 query_base = """
307- SELECT table_schema, table_name, field_path
307+ SELECT table_schema, table_name, field_path, data_type
308308 FROM `{dataset_id}`.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS
309309 WHERE table_schema NOT IN ('information_schema')
310310 """
@@ -325,7 +325,7 @@ def get_schema(self, get_stats=False):
325325 table_name = "{0}.{1}" .format (row ["table_schema" ], row ["table_name" ])
326326 if table_name not in schema :
327327 schema [table_name ] = {"name" : table_name , "columns" : []}
328- schema [table_name ]["columns" ].append (row ["field_path" ])
328+ schema [table_name ]["columns" ].append ({ "name" : row ["field_path" ], "type" : row [ "data_type" ]} )
329329
330330 return list (schema .values ())
331331
You can’t perform that action at this time.
0 commit comments