Skip to content
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

InfluxDB warning while running skyplot #285

Open
bgottula opened this issue Mar 16, 2023 · 0 comments
Open

InfluxDB warning while running skyplot #285

bgottula opened this issue Mar 16, 2023 · 0 comments
Assignees
Labels

Comments

@bgottula
Copy link
Collaborator

Got the following warning running skyplot:

/home/rgottula/dev/venv/lib/python3.10/site-packages/influxdb_client/client/warnings.py:31: MissingPivotFunction: The query doesn't contains the pivot() function.

The result will not be shaped to optimal processing by pandas.DataFrame. Use the pivot() function by:

    from(bucket: "telem")|> range(start: 1678963137, stop: 1678963808)|> filter(fn: (r) => r._measurement == "mount_position" and (r._field == "azimuth" or r._field == "altitude"))|> aggregateWindow(every: 1s, fn: first, createEmpty: false) |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")

You can disable this warning by:
    import warnings
    from influxdb_client.client.warnings import MissingPivotFunction

    warnings.simplefilter("ignore", MissingPivotFunction)

For more info see:
    - https://docs.influxdata.com/resources/videos/pivots-in-flux/
    - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/
    - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/

  warnings.warn(message, MissingPivotFunction)
@bgottula bgottula self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant