Skip to main content
Alpha flags are experimental and can change or be removed without notice. Rules marked alpha need the alpha-rules flag. cdf check needs check, and cdf build --validate needs build-validate.
The rules library lists the insight codes that the Cognite Toolkit reports. An insight is a finding in your configuration or your Cognite Data Fusion (CDF) project, such as a missing reference, a change that CDF can’t apply, or a recommendation. The Cognite Toolkit prints each insight with its code in brackets, for example [MISSING-REFERENCED-RESOURCE], and writes all insights to build/insights.csv. Use the code to look up the rule on this page, or to ignore the rule.

How rules are described

The same code can apply to several resource types, with a different trigger for each. For example, INVALID-RESOURCE-CHANGE applies to containers, views, and data models. Each rule lists the code, the resource type, the severity, the context, and whether the rule is alpha. When one code has more than one trigger, the table also says when the Cognite Toolkit reports it.

Code

Codes use the pattern PROBLEM-SUBJECT, such as MISSING-REFERENCED-RESOURCE. The first word tells you how certain the finding is:
  • MISSING-*, INVALID-*, and EXCEEDED-*: the Cognite Toolkit confirmed the problem.
  • UNVERIFIED-* and UNRECOGNIZED-*: the Cognite Toolkit couldn’t confirm the problem. These codes are always warnings.

Severity

Context

The context tells you which command reports the rule, and whether the rule needs access to CDF.

Ignore or enforce rules

To skip a code in one file, add a comment like this to the file:
To skip a code in every file, or to make cdf build fail when any insight remains, use the [rules] section in cdf.toml. See the rules section for the options and the comment syntax.

Find a rule

Filter the rules by code, severity, context, or resource type. Select a code to go to its description.

Codes

ANTI-PATTERN

A view has a hasData filter on another view. CDF resolves a hasData filter on a view through the containers of that view, and rejects the filter if that view refers back to the first view. To fix it, use hasData on the containers of the referenced view instead of on the view itself.

DEGRADED-PERFORMANCE

The configuration is valid, but queries against it are slow. To fix it, follow the suggestion in the insight: replace a nested filter with a hasData or node type filter, add a requires constraint, or add a B-tree index with cursorable: true on the direct relation property.

DEPRECATED-FEATURE

The configuration uses a feature or API that is deprecated. See deprecated and retired features for replacements and retirement dates. To fix it, move to the replacement named in the insight. For example, replace a timeseries property with a direct relation to a CogniteTimeSeries instance. For sequence rows, use cdf data download sequences and cdf data upload dir.

DUPLICATED-IDENTIFIER

Two or more resources have the same identifier. To fix it, remove the duplicate definition or give it a unique identifier.

EXCEEDED-LIMIT

The configuration, or the deployment, goes over a CDF limit. To fix it, reduce the number or size of what the insight names, so it stays within the limit shown in the message.

FAILED-REQUEST

A request to the CDF API failed during deployment. To fix it, read the error in the insight, fix the cause, and run the command again.

FAILING-JOB

A job in the CDF project failed within the lookback period. By default, cdf check looks back 3 days. Change the period with --lookback-period. To fix it, follow the suggested fix in the insight, and open the link to see the failed run in CDF.

INVALID-FIELD

A field in the YAML file is invalid. To fix it, compare the YAML with the resource library. For agents, use a runtime version that supports the field, or remove the field.

INVALID-FILE-CONTENT

A file has content the Cognite Toolkit can’t use. To fix it, correct the file at the line and column shown in the insight. Remove empty YAML files.

INVALID-FILE-SUFFIX

The resource type in the filename isn’t a known type for the resource folder. For example, a file named my_view.Viw.yaml in the data_modeling folder. To fix it, rename the file with a resource type from the resource library.

INVALID-REFERENCED-PROPERTY

A reverse direct relation in a view goes through a property that isn’t a direct relation. To fix it, point the reverse direct relation at a property of type direct.

INVALID-REFERENCED-RESOURCE

A view that an InField location configuration uses for a card is missing properties that the card requires. To fix it, add the properties listed in the insight to the view, or use a different view.

INVALID-REQUIREMENTS

The requirements.txt file for a function fails validation, so the function can’t be installed. To fix it, correct the package names and versions in requirements.txt.

INVALID-RESOURCE-CHANGE

The local configuration changes a deployed resource in a way CDF doesn’t support. If you deploy, CDF doesn’t apply the change. See impact of changes to views and data models. To fix it, revert the change, or bump the view or data model version. To make your local files match CDF, run cdf modules pull. This overwrites your local YAML files.

INVALID-VALUE

A value in the configuration isn’t valid for the CDF project or the resource. To fix it, use one of the values listed in the insight. For InField, use a new instance space for dataStorage.appInstanceSpace.

INVALID-VARIABLE-PATH

A variable path in the config file doesn’t match the folder structure in the modules directory. To fix it, place the variable under the path of the module or folder where you use it.

INVALID-VARIABLE-TYPE

A list variable in the config file contains items of different or unsupported types. To fix it, make every item in the list the same type: string, integer, float, Boolean, or dictionary.

MISSING-FILE-SUFFIX

The filename has no resource-type suffix, so the Cognite Toolkit skips the file. For example, my_view.yaml instead of my_view.View.yaml. To fix it, rename the file so the resource type is the suffix, as in my_view.View.yaml.

MISSING-READ-ACCESS

The credentials the Cognite Toolkit uses don’t have READ access to a resource type. To fix it, give the service account READ access to the resource type.

MISSING-REFERENCED-DIRECTORY

A directory that the resource needs doesn’t exist. To fix it, add the directory at the path shown in the insight. For web apps, run npm run build before you deploy.

MISSING-REFERENCED-FILE

A file that the resource references doesn’t exist. To fix it, add the file at the path shown in the insight, or correct the reference.

MISSING-REFERENCED-PROPERTY

A property that the configuration references doesn’t exist in your modules or in CDF. To fix it, create the property, or remove or correct the reference. Without CDF credentials, the Cognite Toolkit reports UNVERIFIED-REFERENCED-PROPERTY instead.

MISSING-REFERENCED-RESOURCE

A resource that the configuration references doesn’t exist. To fix it, add the resource to your modules, deploy it first, or remove the reference. Without CDF credentials, the Cognite Toolkit reports UNVERIFIED-REFERENCED-RESOURCE instead.

MISSING-VALUE

A value that the resource needs is missing. To fix it, add the value named in the insight.

NONEMPTY-RESOURCE

The resource contains data, so cdf deploy or cdf clean doesn’t delete or update it. To fix it, delete the data first, or run the command with --drop-data if you want to delete the data with the resource.

REDUNDANT-PROPERTY

A field has no effect. To fix it, remove the redundant capability or field.

UNGOVERNED-RESOURCE

The resource isn’t assigned to a data set, or to a space for resources that support spaces. Without a data set, you can’t control access to the resource. To fix it, set dataSetExternalId, or space where the resource type supports it.

UNREADABLE-FILE

The Cognite Toolkit can’t read the file, or can’t read the identifier of a resource in the file after a validation error. To fix it, check the file encoding and permissions, and make sure each resource has its identifier fields.

UNRECOGNIZED-FIELD

A field isn’t part of the resource schema. The Cognite Toolkit deploys the field unchanged, and CDF may reject it. To fix it, check the field name for typos against the resource library.

UNRECOGNIZED-VALUE

A value isn’t a known option, for example, an unknown capability name in a group. The Cognite Toolkit deploys the value unchanged, and CDF may reject it. To fix it, compare the value with the resource library.

UNRESOLVED-VARIABLE

A variable placeholder, such as {{ my_variable }}, has no value. To fix it, define the variable in the config file for that environment, such as config.dev.yaml, under the variables path that matches the module.

UNSUPPORTED-RESOURCE-CREATION

The Cognite Toolkit doesn’t create MQTT broker sources, because the CDF response includes authentication information that would be lost. To fix it, create the source through the CDF API. The Cognite Toolkit can update the source after it exists.

UNSUPPORTED-RESOURCE-REMOVAL

Something you removed from the local configuration can’t be removed from CDF. To fix it, add the removed items back, or bump the view or data model version. To make your local files match CDF, run cdf modules pull.

UNUSED-RESOURCE

A resource in the CDF project is older than the minimum age and isn’t used. For example, a transformation that has never run, or a space without instances. By default, the minimum age is 14 days. To fix it, delete the resources listed in the insight, or start using them.

UNVERIFIED-CREDENTIALS

The Cognite Toolkit can’t compare the credentials of an external data source with CDF, so it treats the source as changed and recreates it on every deployment. No fix is needed. The warning tells you why the source is recreated.

UNVERIFIED-REFERENCED-PROPERTY

A view references a container property or a direct relation that isn’t in your modules, and the Cognite Toolkit didn’t check CDF. To fix it, run cdf build with CDF credentials so the Cognite Toolkit can check CDF, or add the property to your modules.

UNVERIFIED-REFERENCED-RESOURCE

A resource that the configuration references isn’t in your modules, and the Cognite Toolkit couldn’t check CDF. To fix it, run cdf build with CDF credentials, add the resource to your modules, or give the service account access to the resource.

Reserved codes

The Cognite Toolkit defines these codes, but doesn’t report them yet: BLOCKED-RESOURCE, INVALID-CREDENTIALS, MISSING-CREDENTIALS, and UNTRIGGERED-RESOURCE. If a rule set fails while it runs, the Cognite Toolkit reports INTERNAL-VALIDATOR-EXCEPTION. This means the rule set has a problem, not necessarily your configuration. The build continues.
Last modified on November 30, 2026