-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved example and fixed comments #5721
Improved example and fixed comments #5721
Conversation
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.
The important parts look great, just a few details and the following--can you:
- remove the submodules from your branch
- take the PR out of draft status
- close your old PR
token=f"DATABASE_TOKEN", | ||
write_client_options=wco) as client: | ||
|
||
#### Example: Writing and querying data |
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.
Thanks for adding this description. The list_code_example
should only contain a code block, not Markdown content. I think we should move the description inside the python code block as python comments.
table = client.query( | ||
'''SELECT * | ||
FROM home | ||
WHERE time >= now() - INTERVAL '90 days' | ||
ORDER BY time''') | ||
``` | ||
This script assumes the client object is correctly configured with your database name, token, and host URL. After running the query, table will contain the queried data formatted as a PyArrow table. |
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.
This script assumes the client object is correctly configured with your database name, token, and host URL. After running the query, table will contain the queried data formatted as a PyArrow table. | |
This script assumes the client object is correctly configured with your database name, token, and host URL. After the script runs, the table variable contains the data formatted as a PyArrow table. |
This should also be a comment inside the code block.
- [`influxdb_client_3.Point`](#class-point): a class for constructing a time series data | ||
point | ||
- [`influxdb_client_3.InfluxDBClient3`](#class-influxdbclient3): a class for interacting with InfluxDB. | ||
- [`influxdb_client_3.Point`](#class-point): a class for constructing time a series data |
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.
- [`influxdb_client_3.Point`](#class-point): a class for constructing time a series data | |
- [`influxdb_client_3.Point`](#class-point): a class for constructing a time series data |
- [`influxdb_client_3.InfluxDBClient3`](#class-influxdbclient3): a class for interacting with InfluxDB | ||
- [`influxdb_client_3.Point`](#class-point): a class for constructing a time series data | ||
point | ||
- [`influxdb_client_3.InfluxDBClient3`](#class-influxdbclient3): a class for interacting with InfluxDB. |
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.
Thanks for catching the punctuation.
Just FYI, we'd typically do the reverse--we don't use periods if all the bullets are phrases (incomplete sentences). If at least one needs a complete sentence, then we'll end them all with periods to be consistent.
I'm not going to nitpick, though, as long as it looks consistent.
|
||
# Write data in batches | ||
```python |
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.
👍
|
||
#### Example: Writing and querying data | ||
|
||
The following example demonstrates how to write sensor data into influxDB and retrieve data from the last 90 days for analysis. |
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.
💯
Closes #
Describe your proposed changes here.
I went with the quick fix for the comments. Shortened the writing and query example. I also gave some more explanation for the example.
(if necessary)