Skip to main content

CFIHOS standard processor for NEAT

Project description

CFIHOS Handler Plugin

Overview

The CFIHOS Handler is a flexible framework that supports multiple processor implementations for handling CFIHOS industrial standard data. This plugin integrates with Cognite NEAT to process and transform CFIHOS data models.

Installation

Install the package from PyPI using pip:

pip install cognite-neat-cfihos-handler

Architecture

The CFIHOS Handler plugin supports multiple processor implementations. Each processor_type maintains a specific CFIHOS data model in Cognite Data Fusion (CDF), allowing you to choose the processing approach that best fits your use case.

Available Processors

Sparse Properties Processor

The sparse_properties_processor is the currently available processor. It is based on two processing concepts:

  1. Containers: Processes the complete CFIHOS model into denormalized container structures.
  2. Views: Processes scoped subsets of the CFIHOS model into CFIHOS view structures based on configured scopes that fit different use cases.

Users select which concept to process by passing the model_type parameter:

  • model_type="containers" - for container-based processing
  • model_type="views" - for view-based processing (requires a scope parameter)

Configuration

The processor type is specified in the configuration file using the processor_type field:

processor_type: sparse  # or other available processor types

The framework will automatically load the corresponding processor based on this configuration.

Example configuration file (config.yaml):

processor_type: sparse
data_model_name: "Your CFIHOS Model"
data_model_external_id: "YOUR_CFIHOS_MODEL_1"
data_model_description: "Generated NEAT Domain Model based on CFIHOS"
container_data_model_space: "sp_your_cfihos_containers"
views_data_model_space: "sp_your_cfihos_views"
model_version: "1"
model_creator: "Your Name"
dms_identifire: "cfihos_name"  # or "cfihos_code"
model_processors_config:
  # ... processor-specific configuration

Usage Examples

Processing Containers

from cognite.neat import NeatSession, get_cognite_client

client = get_cognite_client(".env")
neat = NeatSession(client)

# Read and process the CFIHOS containers model
neat.plugins.data_model.read(
    "cfihos",
    model_type="containers",
    configurationDir="configuration/config.yaml"
)

# Deploy to CDF
neat.to.cdf.data_model()

Processing Views

from cognite.neat import NeatSession, get_cognite_client

client = get_cognite_client(".env")
neat_views = NeatSession(client)

# Read and process the CFIHOS views model
# NOTE: Always deploy containers before deploying views
neat_views.plugins.data_model.read(
    "cfihos",
    model_type="views",
    scope="Example Centrifugal Pump",  # Required for views
    configurationDir="configuration/config.yaml",
)

# Deploy to CDF
neat_views.to.cdf.data_model()

Requirements

  • Python >= 3.10
  • cognite-neat >= 0.123.33

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognite_neat_cfihos_handler-0.2.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognite_neat_cfihos_handler-0.2-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

Details for the file cognite_neat_cfihos_handler-0.2.tar.gz.

File metadata

File hashes

Hashes for cognite_neat_cfihos_handler-0.2.tar.gz
Algorithm Hash digest
SHA256 dd39f2448906243cc5736d2c0b6e36e8783affd1dc84889ab206d65185008dee
MD5 c13c21888db121d6d05c68c0c1cb2a95
BLAKE2b-256 13f5155f5e1201fe08b4281268a7e297680da7e27aa5d1108d5523ab68c68020

See more details on using hashes here.

File details

Details for the file cognite_neat_cfihos_handler-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cognite_neat_cfihos_handler-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87ff15d62b5f58f1db716c070f6d99c8e645d26996171e2417d65b65448cad9f
MD5 bb2b5e0ce05caec95f418049dc91c5e9
BLAKE2b-256 d78dc2a8b5fad710e1ad9846fc846d62ab12c0b5ef7196c93968c966e62fdabc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page