Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 789bb4b

Browse files
committed
Update readme
1 parent 9d029e4 commit 789bb4b

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,39 @@ If Grafana is running on a Google Compute Engine (GCE) virtual machine, it is po
124124

125125
Read more about creating and enabling service accounts for GCE VM instances [here](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances).
126126

127+
#### Using the Query Builder
128+
The query builder provides a simple user-friendly interface to help you quickly set up your query. The builder enables you to define the basic parts of your query, The common ones are:
129+
1. The table you want to query from
130+
2. The time field and metric field
131+
3. WHERE clause - You can use one of the pre-defined macros to speed your writing time or set up your own Expression. Existing Macros are:
132+
133+
a. Macro $__timeFiler with last 7 days example:
134+
```
135+
WHERE `createDate` BETWEEN TIMESTAMP_MILLIS (1592147699012) AND TIMESTAMP_MILLIS (1592752499012) AND _PARTITIONTIME >= '2020-06-14 18:14:59' AND _PARTITIONTIME < '2020-06-21 18:14:59'
136+
```
137+
b. Macro $__timeFrom with last 7 days example:
138+
```
139+
WHERE `createDate` > TIMESTAMP_MILLIS (1592223758609) AND _PARTITIONTIME >= '2020-06-15 15:22:38' AND _PARTITIONTIME < '2020-06-22 15:22:38'
140+
```
141+
c. Macro $__timeTo with last 7 days example:
142+
```
143+
WHERE `createDate` < TIMESTAMP_MILLIS (1592828659681) AND _PARTITIONTIME >= '2020-06-15 15:24:19' AND _PARTITIONTIME < '2020-06-22 15:24:19'
144+
```
145+
146+
4. GROUP BY option - You can use a pre-defined macro or use one of the fields from your query
147+
a. time ($__interval,none)
148+
5. ORDER BY option
149+
150+
Note: If your processing location is not the Default US one set your location from the processing Location drop-down at the top right bottom of the query builder
151+
152+
###Troubleshooting
153+
Viewing your Query
154+
1. Use The Query Inspector located at the top of the query builder
155+
156+
2. The query Inspector enables you to see the clean query and troubleshoot SQL errors
157+
158+
The Query builder comes with a set of defaults which are control from the top of the Query Builder
159+
127160
### Build
128161

129162
The build works with Yarn:

dist/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{"name": "GitHub", "url": "https://github.com/doitintl/bigquery-grafana"},
2929
{"name": "MIT License", "url": "https://github.com/doitintl/bigquery-grafana/blob/master/LICENSE.md"}
3030
],
31-
"version": "1.0.9"
31+
"version": "2.0.0"
3232
},
3333
"routes": [
3434
{

src/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{"name": "GitHub", "url": "https://github.com/doitintl/bigquery-grafana"},
2929
{"name": "MIT License", "url": "https://github.com/doitintl/bigquery-grafana/blob/master/LICENSE.md"}
3030
],
31-
"version": "1.0.9"
31+
"version": "2.0.0"
3232
},
3333
"routes": [
3434
{

0 commit comments

Comments
 (0)