influxdata / influxdata/influxdb-client-python
client.delete_api() not working anymore?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 793
- Forks
- 186
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 1
Description
Specifications
- Client Version: 1.27.0
- InfluxDB Version: Cloud
- Platform: Windows 10
I am trying to use the below function that we normally use to delete a measurement. But it seems to no longer be working as intended. Has this been depreceated?
def delete_influx(self, device):
"""Given a 'measurement' name (e.g. device ID), delete the related data from InfluxDB"""
start = "1970-01-01T00:00:00Z"
stop = "2099-01-01T00:00:00Z"
delete_api = self.client.delete_api()
delete_api.delete(
start,
stop,
f'_measurement="{device}"',
bucket=self.influx_bucket,
org=self.org_id,
)
Code sample to reproduce problem
self.client.delete_api()
delete_api.delete(
start,
stop,
f'_measurement="{device}"',
bucket=self.influx_bucket,
org=self.org_id,
)
Expected behavior
The entire measurement should be deleted from my influxdb cloud bucket
Actual behavior
The measurement is not deleted from the cloud bucket. I am not sure if this is related to the test being performed on a newly created cloud bucket, whereas previous tests have been performed on older accounts (where the UI in the cloud bucket looks very different). The versions appear to be the same, though, and I can write data to the bucket without issues.
Additional info
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the client.delete_api() entry point and reproduce the call against an InfluxDB Cloud bucket using the provided Python example and client version 1.27.0. Check whether the measurement deletion request is accepted and whether the behavior differs for newly created versus older buckets; done means determining the supported behavior or documenting the confirmed cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100