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. Review the available data modeling modes and validation rules before configuring your NEAT session.
Class reference
cognite.neat.NeatConfig — Bases: ConfigModel
NeatSession configuration.
Methods
__str__()
Returns a human-readable configuration summary.
create_predefined(profile='legacy-additive')
Create NeatConfig from internal profiles.
| Parameter | Type | Description | Default |
|---|
| profile | PredefinedProfile | Profile name to use | 'legacy-additive' |
- 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
Example
from cognite.neat import NeatConfig
config = NeatConfig.create_predefined(profile = "legacy-additive")
Custom configuration via TOML file
You can define custom profiles in a TOML configuration file. Place the configuration file 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 wildcard patterns)
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
cognite.neat.get_neat_config_from_file(config_file_name, profile) — Get NeatConfig from file or internal profiles.
| Parameter | Type | Description | Default |
|---|
| config_file_name | str | Path to configuration file | required |
| profile | str | Profile name to use | required |
Returns: NeatConfig instance.
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")
You cannot override the pre-defined profiles (legacy-additive, legacy-rebuild, deep-additive, deep-rebuild) in TOML files. Use custom profile names for your configurations.
Further reading