CartoDB / carto-python

CARTO Python client
https://carto.com
BSD 3-Clause "New" or "Revised" License
154 stars 62 forks source link

feature request: DatasetManager.delete #71

Closed andy-esch closed 6 years ago

andy-esch commented 6 years ago

Deleting datasets is an important task, and this library should support it. The call is a 'DELETE' request to api/v1/viz.

Like Builder, a call to DatasetManager.delete should error/warn if a dataset is connected to a map. I prefer an Error in the Python case. Adding a force=False|True will let users force the operation regardless. As far as I know, there's metadata in the api/v1/viz GET that lists the dependents of a table.

danicarrion commented 6 years ago

Deleting tables is already supported: https://github.com/CartoDB/carto-python/blob/master/examples/import_and_merge.py#L135, can you please confirm if it's not working?

Will take a look at the warning feature.

andy-esch commented 6 years ago

Ah, great, I didn't see delete in the code before.

andy-esch commented 6 years ago

Sorry for the noise!