Class DataSetExtensions
Extensions for cognite data sets.
Inherited Members
Namespace: Cognite.Extensions
Assembly: Cognite.Extensions.dll
Syntax
public static class DataSetExtensions
Methods
| Edit this page View SourceGet(DataSetsResource, DataSetConfig, CancellationToken)
Retrieve the configured dataset. Will throw an exception if the dataset does not exist, or if retrieval failed.
Declaration
public static Task<DataSet?> Get(this DataSetsResource resource, DataSetConfig config, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
DataSetsResource | resource | Client to use for retrieval. |
DataSetConfig | config | Config to retrieve data set for. |
CancellationToken | token | Cancellation token |
Returns
Type | Description |
---|---|
Task<DataSet> | Dataset if configured |
GetId(DataSetsResource, DataSetConfig, CancellationToken)
Retrieve the configured data set ID. This will only make a request to CDF if ExternalId is configured without Id.
Will throw an exception if configured using ExternalId and retrieval failed.
Declaration
public static Task<long?> GetId(this DataSetsResource resource, DataSetConfig config, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
DataSetsResource | resource | Client to use for retrieval. |
DataSetConfig | config | Config to retrieve data set for. |
CancellationToken | token | Cancellation token |
Returns
Type | Description |
---|---|
Task<long?> | Dataset ID if configured |