@@ -15,21 +15,24 @@ def render_query(dataset, tables, select=None, conditions=None,
1515 tables : Union[dict, list]
1616 The table in `dataset` to query.
1717 select : dict, optional
18- The keys function as column names and the values function as options to apply to
19- the select field such as alias and format. For example, select['start_time'] might
20- have the form {'alias': 'StartTime', 'format': 'INTEGER-FORMAT_UTC_USEC'}, which would
21- be represented as 'SEC_TO_TIMESTAMP(INTEGER(start_time)) as StartTime' in a query. Pass
22- `None` to seoect all.
18+ The keys function as column names and the values function as options to
19+ apply to the select field such as alias and format. For example,
20+ select['start_time'] might have the form
21+ {'alias': 'StartTime', 'format': 'INTEGER-FORMAT_UTC_USEC'}, which
22+ would be represented as 'SEC_TO_TIMESTAMP(INTEGER(start_time)) as
23+ StartTime' in a query. Pass `None` to select all.
2324 conditions : list, optional
24- a ``list`` of ``dict`` objects to filter results by. Each dict should have the keys 'field',
25- 'type', and 'comparators'. The first two map to strings representing the field (e.g. 'foo')
26- and type (e.g. 'FLOAT'). 'comparators' maps to another ``dict`` containing the keys 'condition',
27- 'negate', and 'value'. If 'comparators' = {'condition': '>=', 'negate': False, 'value': 1}, this
28- example will be rdnered as 'foo >= FLOAT('1')' in the query.
25+ a ``list`` of ``dict`` objects to filter results by. Each dict should
26+ have the keys 'field', 'type', and 'comparators'. The first two map to
27+ strings representing the field (e.g. 'foo') and type (e.g. 'FLOAT').
28+ 'comparators' maps to another ``dict`` containing the keys 'condition',
29+ 'negate', and 'value'.
30+ If 'comparators' = {'condition': '>=', 'negate': False, 'value': 1},
31+ this example will be rdnered as 'foo >= FLOAT('1')' in the query.
2932 ``list`` of field names to group by
3033 order_by : dict, optional
31- Keys = {'field', 'direction'}. `dict` should be formatted as {'field':'TimeStamp, 'direction':'desc'}
32- or similar
34+ Keys = {'field', 'direction'}. `dict` should be formatted as
35+ {'field':'TimeStamp, 'direction':'desc'} or similar
3336
3437 Returns
3538 -------
@@ -149,7 +152,8 @@ def _render_sources(dataset, tables):
149152 tables ['from_date' ],
150153 tables ['to_date' ])
151154 except KeyError as exp :
152- logger .warn ('Missing parameter %s in selecting sources' % (exp ))
155+ logger .warn (
156+ 'Missing parameter %s in selecting sources' % (exp ))
153157
154158 else :
155159 return "FROM " + ", " .join (
0 commit comments