Get the data from BigQuery.
(params, query, offset, limit)
| 125 | |
| 126 | |
| 127 | def get(params, query, offset, limit): |
| 128 | """Get the data from BigQuery.""" |
| 129 | sql = SQL.format( |
| 130 | table_id='%ss' % params['type'], |
| 131 | where_clause=query.get_where_clause(), |
| 132 | prefix=params['type'], |
| 133 | offset=offset, |
| 134 | limit=limit) |
| 135 | client = big_query.Client() |
| 136 | result = client.query(query=sql, offset=offset, limit=limit) |
| 137 | return result.rows, result.total_count |
| 138 | |
| 139 | |
| 140 | def get_result(): |
no test coverage detected