def getData(table_name, task): query_string = "SELECT key, FgL, FgR FROM [data.{0}] WHERE task = '{1}'".format(table_name, task) rows = queryGoogle(query_string) data = defaultdict(list) for row in rows['rows']: key = row['f'][0]['v'] fgl = row['f'][1]['v'] fgr = row['f'][2]['v'] data[key].append([fgl, fgr]) return data
def getTasks(table_name): tasks = queryGoogle("SELECT task from data.{0} GROUP BY task".format(table_name))