Interface IRawDestination
A destination capable of pushing to raw
Namespace: Cognite.Extractor.StateStorage
Assembly: Cognite.StateStorage.dll
Syntax
public interface IRawDestination
Methods
| Edit this page View SourceDeleteRowsAsync(string, string, IEnumerable<string>, CancellationToken)
Delete the given rows from raw database
Declaration
Task DeleteRowsAsync(string dbName, string tableName, IEnumerable<string> rowKeys, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dbName | Database to delete from |
| string | tableName | Table to delete from |
| IEnumerable<string> | rowKeys | Keys for rows to delete |
| CancellationToken | token | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
GetRowsAsync(string, string, JsonSerializerOptions?, CancellationToken)
Returns all rows from the given database and table
Declaration
Task<IDictionary<string, IDictionary<string, JsonElement>>> GetRowsAsync(string dbName, string tableName, JsonSerializerOptions? options, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dbName | Database to read from |
| string | tableName | Table to read from |
| JsonSerializerOptions | options | Optional JSON serializer options |
| CancellationToken | token | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task<IDictionary<string, IDictionary<string, JsonElement>>> | All rows |
GetRowsAsync<T>(string, string, JsonSerializerOptions?, CancellationToken)
Returns all rows from the given database and table
Declaration
Task<IDictionary<string, T>> GetRowsAsync<T>(string dbName, string tableName, JsonSerializerOptions? options, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dbName | Database to read from |
| string | tableName | Table to read from |
| JsonSerializerOptions | options | Optional json serializer options |
| CancellationToken | token | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task<IDictionary<string, T>> | All rows |
Type Parameters
| Name | Description |
|---|---|
| T |
InsertRawRowsAsync<T>(string, string, IDictionary<string, T>, JsonSerializerOptions?, CancellationToken)
Insert the provided rows into CDF Raw. The rows are a dictionary of
keys and DTOs (data type objects). The DTOs of type T are serialized to JSON
before they are sent to Raw. If the database or table do not
exist, they are created
Declaration
Task InsertRawRowsAsync<T>(string database, string table, IDictionary<string, T> rows, JsonSerializerOptions? options, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | database | Raw database name |
| string | table | Raw table name |
| IDictionary<string, T> | rows | Rows of keys and columns |
| JsonSerializerOptions | options | Optional JSON serializer options |
| CancellationToken | token | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task | Task |
Type Parameters
| Name | Description |
|---|---|
| T | DTO type |