|
@@ -48,7 +48,7 @@ Macro example | Description
|
|
|
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *extract(epoch from dateColumn) BETWEEN 1494410783 AND 1494497183*
|
|
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *extract(epoch from dateColumn) BETWEEN 1494410783 AND 1494497183*
|
|
|
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *to_timestamp(1494410783)*
|
|
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *to_timestamp(1494410783)*
|
|
|
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *to_timestamp(1494497183)*
|
|
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *to_timestamp(1494497183)*
|
|
|
-*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from "dateColumn")/300)::bigint*300*
|
|
|
|
|
|
|
+*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from dateColumn)/300)::bigint*300 AS time*
|
|
|
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
|
|
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
|
|
|
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
|
|
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
|
|
|
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
|
|
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
|
|
@@ -94,7 +94,7 @@ Example with `metric` column
|
|
|
|
|
|
|
|
```sql
|
|
```sql
|
|
|
SELECT
|
|
SELECT
|
|
|
- $__timeGroup(time_date_time,'5m') as time,
|
|
|
|
|
|
|
+ $__timeGroup(time_date_time,'5m'),
|
|
|
min(value_double),
|
|
min(value_double),
|
|
|
'min' as metric
|
|
'min' as metric
|
|
|
FROM test_data
|
|
FROM test_data
|
|
@@ -107,7 +107,7 @@ Example with multiple columns:
|
|
|
|
|
|
|
|
```sql
|
|
```sql
|
|
|
SELECT
|
|
SELECT
|
|
|
- $__timeGroup(time_date_time,'5m') as time,
|
|
|
|
|
|
|
+ $__timeGroup(time_date_time,'5m'),
|
|
|
min(value_double) as min_value,
|
|
min(value_double) as min_value,
|
|
|
max(value_double) as max_value
|
|
max(value_double) as max_value
|
|
|
FROM test_data
|
|
FROM test_data
|