Odd parameter scheme for writePoints(), vs. the docs?
See original GitHub issueIMO the way parameters are passed to writePoints
is a little odd, each point being an array of two objects, with the timestamp being a special field in the first object. This goes against the order specified in the Line Protocol docs, measurement,tag1=value1,tag2=value2 field1=value1,field2=value2 timestamp
.
How about an alternative API, where a point can be an object instead of a 2-element array, with a key fields
, and optional keys time
and tags
?
writePoints(measurementName, [
{
fields: {value: 123, otherValue: 456},
tags: {foo: 'bar'},
time: new Date()
},
{
fields: {foo: 123} // no tags or timestamp
},
{
fields: 123 // automatically converted to value=123
},
[{a: 1}, {b: 2}], // old school - unclear which is the field and which is the tag
], [options], callback)
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
How can I write a point value as an integer? #190 - GitHub
Odd parameter scheme for writePoints(), vs. the docs? ... Please feel free to take a read over the docs (and/or code) here and...
Read more >Functional Programming - Introduction to Scheme
Scheme is a dialect of Lisp, the second-oldest programming language that is still ... In order to call product() , 0 or more...
Read more >UeiDaq Framework User Manual
This manual provides documentation for using the UeiDaq framework API. ... can then configure the session parameters and operate the session.
Read more >Niagara IRM Function Blocks - Centraline
Input, Output and Parameter slots. The output slots are located at the top of the FB and the inputs at the bottom. This...
Read more >OBIX Version 1.1 - OASIS Open
Companion documents will specify the protocol bindings and encodings for specific ... Typically, http scheme URIs are used, but other bindings may require ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
seriesName !== measureName.
The name series is used in several places where the name measure should be used. For instance writeSeries with its current usage is misleading. A series is a unique combo of retention, measure, and tags. The way the writeSeries is used is more a write multiple points for multiple measures. It might be better to merge writeSeries and writePoints with the following usage:
To be clear there is no such thing as a series name only measure name.
With completion of the write API in https://github.com/node-influx/node-influx/commit/0ef0889605cab3d323ff0b4cf4992757a60472d8 I’m closing this issue. Please feel free to take a read over the docs (and/or code) here and let me know if you’ve suggestions for improvement: index.ts#L540