Datasets
Logical groupings of resources and time-series. Datasets can be nested (a dataset can belong to a parent dataset), and that hierarchy is live in queries: filtering time-series by a dataset also matches everything beneath it. Filter series →
The hierarchy is built from BELONGS_TO edges, and the server enforces that: a relation
pointing at a dataset must be BELONGS_TO, and a dataset can only claim a time-series
that isn't already in another dataset.
Edge rules →
The server does not rewrite a dataset external id: Plant-A stays Plant-A. Some clients
derive one from the name as a convenience (the Rust Dataset::new below), and that
derivation is snake_case — but it is a client-side default, not a server rule.
Uniqueness and lookup both ignore case, so plant_a collides with PLANT_A and either
spelling finds the same dataset. Datasets are also subject to the
naming policy if an administrator has set one.
External ids & naming →
Create
- Java
- Python
- Rust
DataSetModel dataset = new DataSetModel();
dataset.setExternalId("plant_a");
dataset.setName("Plant A");
client.datasets().create(List.of(dataset));
import datahub_sdk
dataset = datahub_sdk.Dataset(external_id="plant_a", name="Plant A")
client.datasets.create([dataset])
use dataplatform_rust_sdk::datasets::Dataset;
// external_id is derived as snake_case of the name → "plant_a"
let dataset = Dataset::new("Plant A".into());
api.datasets.create(&vec![dataset]).await?;
Look up & delete
- Java
- Python
- Rust
DataWrapper<DataSetModel> some = client.datasets()
.byIds(List.of(IdCollection.createFromExternalId("plant_a")));
client.datasets().delete(List.of(IdCollection.createFromExternalId("plant_a")));
some = client.datasets.by_ids(["plant_a"])
client.datasets.delete(["plant_a"])
use dataplatform_rust_sdk::generic::IdAndExtId;
let some = api.datasets.by_ids(&vec![IdAndExtId::from_external_id("plant_a")]).await?;
api.datasets.delete(&vec![IdAndExtId::from_external_id("plant_a")]).await?;
The Java client additionally offers list(DataSetRetreiver), search(DataSetSearch) and
update(List<DataSetForm>); the Rust client offers filter(&DatasetFilter) and
search(&DatasetSearch).