Session
cognite.neat._session.NeatSession
#
Creates a new NeatSession.
This is the main entry point for using Neat. It provides access to the different APIs that can be used to read, write, and manipulate data and data models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
CogniteClient | None
|
The CogniteClient to use for reading and writing data. |
None
|
storage |
Literal['memory', 'oxigraph']
|
The storage type to use for storing data and data models. Can be either "memory" or "oxigraph". In "memory" mode works well for small data sets and when only working with data models. It is works well for all notebook environments. In "oxigraph" mode, the data is stored in an Oxigraph database. This is more performant for larger data sets and when working with data. Note that this option requires additional dependencies to be installed and is not available in CDF Notebooks. |
'memory'
|
verbose |
bool
|
Whether to print information about the operations being performed. |
True
|
load_engine |
Literal['newest', 'cache', 'skip']
|
Whether to load the Neat Engine. Can be "newest", "cache", or "skip". "newest" will always check for the newest version of the engine. "cache" will load the engine if it has been downloaded before. "skip" will not load the engine. |
'cache'
|
Example
Instantiate a NeatSession outside CDF jupyter notebook (needs instantiation of a CogniteClient)
Example
Instantiate a NeatSession inside a CDF jupyter notebook (use your user's CogniteClient directly)
version: str
property
#
verify()
#
Verify the Data Model schema before the model can be written to CDF. If verification was unsuccessful, use
.inspect.issues()
to see what went wrong.
convert(target)
#
Converts the last verified data model to the target type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
Literal['dms', 'information']
|
The target type to convert the data model to. |
required |
infer(model_id=('neat_space', 'NeatInferredDataModel', 'v1'), max_number_of_instance=100)
#
Data model inference from instances.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_id |
DataModelId | tuple[str, str, str]
|
The ID of the inferred data model. |
('neat_space', 'NeatInferredDataModel', 'v1')
|
max_number_of_instance |
int
|
The maximum number of instances to use for inference. |
100
|