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

client.delete_api() not working anymore? #560

Open
MatinF opened this issue Feb 17, 2023 · 4 comments
Open

client.delete_api() not working anymore? #560

MatinF opened this issue Feb 17, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@MatinF
Copy link

MatinF commented Feb 17, 2023

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

@MatinF MatinF added the bug Something isn't working label Feb 17, 2023
@MatinF
Copy link
Author

MatinF commented Jun 21, 2023

Any update on this?

@bednar
Copy link
Contributor

bednar commented Jun 21, 2023

Hi @MatinF,

which type of the InfluxDB Cloud do you use? The InfluxDB Cloud Serverless doesn't supports delete data. For more info see - https://docs.influxdata.com/influxdb/cloud-serverless/write-data/delete-data/.

Regards

@MatinF
Copy link
Author

MatinF commented Jun 21, 2023

This problem is for the Serverless indeed. In the a

For context, our use case and challenge is this:

  1. We guide our users (automotive engineers) to using the InfluxDB Python API to write data to InfluxDB from our IoT data loggers
  2. A data logger is registered as a 'measurement' with the device serialnumber acting as the measurement name
  3. Each device may write 1 to 1000 unique parameters depending on the application (car, truck, boat, ...) and use case - each of these parameters are written as a separate 'field' in InfluxDB

In the past with TSM, the above setup was no problem: Users could write any number of signals for a given measurement. If, for some reason, they wanted to delete a measurement entirely, this could be done via the aforementioned delete function.

However, with the transition to the new InfluxDB cloud and 'serverless' system, two problems arise:

  1. It is now only possible to write a max of 200 unique fields for a measurement - trying to add additional new fields fails with a warning stating that this would add too many columns
  2. If a user has thus by accident written 200 unique parameters already for a measurement, they would need to delete that measurement entirely to be able to write new fields (e.g. in order to now selectively only write less than 200 specific signals). But this now seemingly requires contacting support

I hope the above provides context. We are really happy about InfluxDB, but these two challenges being introduced with Serverless are major headaches for all our users.

@dgnorton
Copy link

@MatinF thanks for raising the issue and providing details about the use case. There have been some internal discussions about the 200 limit. We'll bring this issue up again for further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants