The BddDatasets class is a container of BddDataset, and provides an iterator to access all data sets of BDD.
dataset(collectionKey, databaseKey)where:
Data sets created in Studio use the same name for both the database and collection keys. You can therefore supply only the collection key as an argument.
>>> dss = bc.datasets() >>> claims_ds = dss.dataset('default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620') >>> claims_ds WarrantyClaims default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620 default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620 Hive default.warrantyclaims
The first command retrieves the "default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620" data set, while the second one prints the contents of claims_ds.
>>> all_ds = bc.datasets() >>> all_ds.next() WarrantyClaims default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620 default_edp_e35f9cbe-96c7-4183-8485-71459b8bd620 Hive default.warrantyclaims >>> all_ds.next() Taxi_Data edp_cli_edp_f28fb378-333a-4e01-8b6e-01dc06ba1e14 edp_cli_edp_f28fb378-333a-4e01-8b6e-01dc06ba1e14 Hive default.taxi_data >>>