Listing collections
To list the collections for a dataset, use thecollections
method on the dataset object.
Output
Creating collections
To create a collection in a dataset, use dataset.create_collection(). This method returns the created collection object.Accessing individual collections
Once you have listed the collections for a dataset using dataset.collections(), you can access a specific collection by retrieving it from the resulting dictionary with its name. Use collection.info() in Python orString()
in Go to get details (name, availability, and count) about it.
Output
Output
Deleting collections
Collections can be deleted from a dataset using thedelete_collection
method.
To delete a collection, you need to have write permission on the dataset.
Deleting a collection will delete all data points in the collection.
Errors you may encounter
NotFoundError
If you attempt to access a collection with a non-existent name, aNotFoundError
is raised. For example: