NeatConfig#
NeatConfig allows you to configure your NEAT session with specific data modeling modes and validation rules. It provides pre-defined governance profiles that combine validation settings with data modeling behavior, or you can define custom profiles via a TOML configuration file. Make sure to get yourself familiar with the available data modeling modes and validation rules before configuring your own NEAT session and custom configurations.
cognite.neat.NeatConfig
#
Bases: ConfigModel
NeatSession configuration.
__str__()
#
Human-readable configuration summary.
create_predefined(profile='legacy-additive')
classmethod
#
Create NeatConfig from internal profiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile |
PredefinedProfile
|
Profile name to use. Defaults to "legacy-additive". |
'legacy-additive'
|
Predefined Profiles
The following predefined profiles are available:
legacy-additive: Additive modeling with legacy validation rules.legacy-rebuild: Rebuild modeling with legacy validation rules.deep-additive: Additive modeling with deep validation rules.deep-rebuild: Rebuild modeling with deep validation rules.
from cognite.neat import NeatConfig
config = NeatConfig.create_predefined(profile = "legacy-additive")
Custom Configuration via TOML File#
cognite.neat.get_neat_config_from_file(config_file_name, profile)
#
Get NeatConfig from file or internal profiles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file_name |
str
|
Path to configuration file. |
required |
profile |
str
|
Profile name to use. |
required |
Returns: NeatConfig instance.
You can define custom profiles in a TOML configuration file. The configuration file can be placed in your project root (e.g., pyproject.toml or neat.toml).
Basic TOML Structure#
[tool.neat]
# Reference a profile (either built-in or custom)
profile = "my-custom-profile"
[tool.neat.modeling]
# Data modeling mode
# Options: "additive", "rebuild"
mode = "additive"
[tool.neat.validation]
# Validation rules to exclude (supports wildcards with *)
exclude = []
Custom Profile Example Define your own profiles with specific validation rules:
[tool.neat]
profile = "my-smart-profile"
[tool.neat.profiles.my-smart-profile.modeling]
mode = "additive"
[tool.neat.profiles.my-smart-profile.validation]
exclude = ["NEAT-DMS-AI-READINESS-*", "NEAT-DMS-CONNECTIONS-REVERSE-008"]
Validation Exclusion Patterns#
The exclude list supports wildcard patterns:
- "NEAT-DMS-AI-READINESS-*" - Excludes all AI-readiness validation rules
- "NEAT-DMS-CONNECTIONS-002" - Excludes a specific validation rule
- "*" - Excludes all validation rules (use with caution)
Loading Custom Configuration#
from cognite.neat import get_neat_config_from_file
# Load from pyproject.toml or neat.toml
config = get_neat_config_from_file("pyproject.toml", profile="my-smart-profile")
Built-in Profiles Cannot Be Redefined
The pre-defined profiles:
legacy-additivelegacy-rebuilddeep-additivedeep-rebuild
are hardcoded and cannot be overridden in TOML files. Use custom profile names for your configurations.