Class CoreTSSanitation
Collection of methods for cleaning and sanitizing objects used in requests to CDM TimeSeries
Inherited Members
Namespace: Cognite.Extensions.DataModels
Assembly: Cognite.Extensions.dll
Syntax
public static class CoreTSSanitation
Fields
| Edit this page View SourceTimeSeriesDescriptionMax
Maximum length of Timeseries description
Declaration
public const int TimeSeriesDescriptionMax = 1000
Field Value
Type | Description |
---|---|
int |
TimeSeriesMetadataMaxBytes
Maximum size in bytes of Timeseries metadata field
Declaration
public const int TimeSeriesMetadataMaxBytes = 10000
Field Value
Type | Description |
---|---|
int |
TimeSeriesMetadataMaxPairs
Maximum number of Timeseries metadata key/value pairs
Declaration
public const int TimeSeriesMetadataMaxPairs = 256
Field Value
Type | Description |
---|---|
int |
TimeSeriesMetadataMaxPerKey
Maximum size in bytes of each Timeseries metadata key
Declaration
public const int TimeSeriesMetadataMaxPerKey = 128
Field Value
Type | Description |
---|---|
int |
TimeSeriesMetadataMaxPerValue
Maximum size in bytes of each Timeseries metadata value
Declaration
public const int TimeSeriesMetadataMaxPerValue = 10000
Field Value
Type | Description |
---|---|
int |
TimeSeriesNameMax
Maximum length of Timeseries name
Declaration
public const int TimeSeriesNameMax = 255
Field Value
Type | Description |
---|---|
int |
TimeSeriesUnitMax
Maximum length of Timeseries unit
Declaration
public const int TimeSeriesUnitMax = 32
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceCleanTimeSeriesRequest<T>(IEnumerable<SourcedNodeWrite<T>>, SanitationMode)
Clean list of T objects, sanitizing each and removing any duplicates. The first encountered duplicate is kept.
Declaration
public static (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>) CleanTimeSeriesRequest<T>(IEnumerable<SourcedNodeWrite<T>> timeseries, SanitationMode mode) where T : CogniteTimeSeriesBase
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<SourcedNodeWrite<T>> | timeseries | T request to clean |
SanitationMode | mode | The type of sanitation to apply |
Returns
Type | Description |
---|---|
(IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>) | Cleaned create request and optional errors for duplicated ids and legacyNames |
Type Parameters
Name | Description |
---|---|
T |
Sanitize<T>(SourcedNodeWrite<T>)
Sanitize a T object so that it can be safely sent to CDF. Requests may still fail due to conflicts or missing ids.
Declaration
public static void Sanitize<T>(this SourcedNodeWrite<T> ts) where T : CogniteTimeSeriesBase
Parameters
Type | Name | Description |
---|---|---|
SourcedNodeWrite<T> | ts | TimeSeries to sanitize |
Type Parameters
Name | Description |
---|---|
T |
Verify<T>(SourcedNodeWrite<T>)
Check that given T satisfies CDF limits.
Declaration
public static ResourceType? Verify<T>(this SourcedNodeWrite<T> ts) where T : CogniteTimeSeriesBase
Parameters
Type | Name | Description |
---|---|---|
SourcedNodeWrite<T> | ts | Timeseries to check |
Returns
Type | Description |
---|---|
ResourceType? | True if timeseries satisfies limits |
Type Parameters
Name | Description |
---|---|
T |