CartoDB / carto-python

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

attribute dependent_visualizations only returns one visualization #161

Closed oriolbx closed 4 years ago

oriolbx commented 4 years ago

I'm trying to get all visualizations associated to a single dataset that has 11 visualizations associated to it. However, when I'm using the DatasetManager class I'm only able to get the first visualization:

# Authenticate to CARTO account
auth_client = APIKeyAuthClient(CARTO_BASE_URL, CARTO_API_KEY, 'organization')

dataset_manager = DatasetManager(auth_client)

dataset = dataset_manager.get('tableName')

associated_maps = [map.name for map in dataset.dependent_visualizations]

print(associated_maps)

Is this behaviour expected? cc @alrocar

alrocar commented 4 years ago

Yes, dependent visualizations is not fully supported, it was added to avoid deleting a dataset that had dependent maps. We don't want to fully support it by default since retrieving dependent vizs is expensive.

I can only suggest you to:

oriolbx commented 4 years ago

The problem that I see with the viz API option is that, as far as I know is not a public API.

In any case, we can close this issue then. Thanks! :)