You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TimeSeries/PublicApis/SdkExamples/PointZilla/Readme.md
+53-7
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Download the [latest PointZilla.exe release here](../../../../../../releases/lat
7
7
Points can be specified from:
8
8
- Command line parameters (useful for appending a single point)
9
9
- Signal generators: linear, saw-tooth, square-wave, or sine-wave signals. Useful for just getting *something* into a time-series
10
-
- CSV files (including CSV exports from AQTS Springboard)
10
+
- CSV files (including CSV exports from AQTS Springboard) from file, FTP, or HTTP sources.
11
11
- Points retrieved live from other AQTS systems, including from legacy 3.X systems.
12
12
- The results of a database query (via direct support fo SqlServer, Postgres, and MySql. ODBC connections are supported too, but require configuration)
13
13
-`CMD.EXE`, `PowerShell` or `bash`: `PointZilla` works well from within any shell.
@@ -34,9 +34,10 @@ These examples will get you through most of the heavy lifting to get some points
34
34
A few interesting operations include:
35
35
-[Appending a few random points](#append-something-to-a-time-series)
36
36
-[Appending a single point](#append-a-single-point-to-a-time-series)
37
-
-[Appending points from a CSV](#append-values-from-a-csv-file)
38
-
-[Appending points from Excel](#appending-values-from-an-excel-spreadsheet)
39
-
-[Appending points from a database](#appending-values-from-a-database-query)
37
+
-[Appending points from a CSV](#append-points-from-a-csv-file)
38
+
-[Appending points from Excel](#append-points-from-an-excel-spreadsheet)
39
+
-[Appending points from an HTTP request](#append-points-from-an-http-request)
40
+
-[Appending points from a database](#append-points-from-a-database-query)
40
41
-[Appending points with grades or qualifiers](#appending-grades-and-qualifiers)
41
42
-[Appending points with notes](#appending-points-with-notes)
42
43
-[Copy points from another time-series](#copying-points-from-another-time-series)
When reading data from a CSV file, use the case-insensitive keyword `Gap` in a timestamp or value column to represent an explicit gap.
131
132
132
-
## Append values from a CSV file
133
+
## Append points from a CSV file
133
134
134
135
`PointZilla` can also read times, values, grade codes, and qualifiers from a CSV file.
135
136
@@ -240,15 +241,60 @@ The following options are all equivalent ways of specifying Australian Central S
240
241
241
242
When the `/UtcOffset` value is explicitly set, the value will also be used when creating any time-series or locations.
242
243
243
-
## Appending values from an Excel spreadsheet
244
+
## Append points from an Excel spreadsheet
244
245
245
246
All the CSV parsing options also apply to parsing Excel workbooks.
246
247
247
248
By default, the first sheet in the workbook will be parsed according to the CSV parsing rules.
248
249
249
250
You can use the `/ExcelSheetNumber=integer` or `/ExcelSheetName=name` options to parse a different sheet in the workbook.
250
251
251
-
## Appending values from a database query
252
+
## Append points from an HTTP request
253
+
254
+
All the CSV parsing options also apply to text downloaded via FTP or HTTP requests.
255
+
256
+
This approach works when the web request returns a text stream for its response payload.
257
+
258
+
Here is a an example HTTP request which uses the [USGS NWIS service](https://help.waterdata.usgs.gov/faq/automated-retrievals#Examples) to fetch the last 24 hours of Stage points (HG in AQTS, code 00065 in NWIS) points from a location.
The NWIS data response includes some commented lines at the start, followed by a 2-line header row, and then the tab-delimited (not comma delimited) data rows follow.
263
+
264
+
```
265
+
# Data provided for site 16010000
266
+
# TS parameter Description
267
+
# 42061 00060 Discharge, cubic feet per second
268
+
# 42062 00065 Gage height, feet
269
+
#
270
+
# Data-value qualification codes included in this output:
16:38:30.592 INFO - Fetching data from https://nwis.waterdata.usgs.gov/hi/nwis/uv/?format=rdb&site_no=16010000&period=PT1D ...
287
+
16:38:31.653 INFO - Fetched 23.5 KB in 1 second, 40 milliseconds.
288
+
16:38:31.810 INFO - Loaded 461 points [2022-03-10T08:00:00Z to 2022-03-11T22:20:00Z] from 'https://nwis.waterdata.usgs.gov/hi/nwis/uv/?format=rdb&site_no=16010000&period=PT1D'.
289
+
16:38:31.813 INFO - Connecting to doug-vm2019 ...
290
+
16:38:31.984 INFO - Connected to doug-vm2019 (2021.4.77.0)
291
+
16:38:32.627 INFO - Appending 461 points [2022-03-10T08:00:00Z to 2022-03-11T22:20:00Z] to Stage.Working@Location (ProcessorBasic) ...
292
+
16:38:33.202 INFO - Appended 461 points and 0 notes (deleting 0 points and 0 notes) in 0.6 seconds.
293
+
```
294
+
295
+
Note: Support for other common web formats like XML, JSON, or Parquet files is not yet supported.
296
+
297
+
## Append points from a database query
252
298
253
299
PointZilla can also execute a database query and import the results from the query as a time-series.
0 commit comments