-
Notifications
You must be signed in to change notification settings - Fork 31
Added precision to 'write' request #30
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #30 +/- ##
==========================================
- Coverage 96.51% 96.34% -0.18%
==========================================
Files 9 9
Lines 545 547 +2
==========================================
+ Hits 526 527 +1
- Misses 19 20 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm keen to see this implemented!
loop: Optional[asyncio.AbstractEventLoop] = None, | ||
redis_opts: Optional[dict] = None, | ||
cache_expiry: int = 86400, | ||
**kwargs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore original indentation
precision: Optional[str] = None, | ||
rp: Optional[str] = None, | ||
tag_columns: Optional[Iterable] = None, | ||
**extra_tags, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore original indentation
raise NotImplementedError("'precision' parameter is not supported yet") | ||
if precision and precision not in {"ns", "u", "ms", "s", "m", "h"}: | ||
raise NotImplementedError("'precision' must must be one of " | ||
"the following: 'ns', 'u', 'ms', 's', 'm', 'h'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably raise ValueError
instead
chunked: bool = False, | ||
chunk_size: Optional[int] = None, | ||
db: Optional[str] = None, | ||
use_cache: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore original indentation
I would like to use this feature, too. Is there anything I could do help finalizing this PR ? |
i'd like to use this too, especially because is mentioned in the official optimization documentation: https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/optimize-writes/#use-the-coarsest-time-precision-possible |
236e958
to
b124183
Compare
I have implemented the
precision
parameter, as InfluxDB API reference contains aprecision
parameter.The only thing is that I have not been able to setup the testing environment to check it works correctly. All the tests except
test_statement_error
pass.Hope it helps! Your library is very useful, thank you!
Tries to resolve #25