Configure data models for InField
The features described in this section are currently in beta testing and are subject to change.
Proper planning is crucial to setting up InField. This section helps you plan and configure the source data and the Cognite Data Fusion (CDF) project that will power the application and describes how to set up assets and visualize data in InField. You can also use the Cognite Toolkit to use pre-built configurations to set up InField.
Looking for the InField configuration documentation on APM? See here.
Before you start
Make sure you have the following:
- A project registered in the CDF application. It must be a Data Modeling only project.
- The CDF API and the CDF application registered in Microsoft Entra ID and Microsoft Entra ID and CDF groups set up to control access to CDF data.
- Assets in the CDF project populated in the
CogniteAsset
concept . - URLs in your allowlist.
Make sure to set up locations in InField even if you have them set up in CDF. At the moment, CDF and InField use different location concepts.
Set up access
You can use your existing identity provider (IdP) framework to manage access to InField and choose admin users. We currently support Microsoft Entra ID. By creating groups, you can assign different sets of capabilities to users.
Create an admin group
Create a group of users who can configure the InField application across all locations. See also how to configure locations in InField.
- Go to CDF > Manage > Manage access.
- Create a group with the required name
applications-configuration
. - Give
read
andwrite
access to all capabilities with the scopeAll
, or have the minimum set of capabilities.
Capability type | Action | Scope | Description |
---|---|---|---|
Groups | groups: read , groups: list | All | For InField administrators to grant access to users. |
Data models | dataModel:read | All | View data models. |
Data model instances | dataModelInstance:read | All | Access data organized in data models. |
Data model instances | dataModelInstance:write | cognite_app_data , APM_Config | Access and edit data organized in data models and spaces. |
Data model instances | dataModelInstance:write_properties | Spaces with time series instances | Access, create and edit time series data. |
Location filters | locationfilters:read , locationfilters:write | All | View locations in your InField project. |
Create user groups
Create groups of users who can view checklists, administer checklists and templates, and work with checklists in the field. You can create similar groups for different locations. The groups can have the same capabilities but different access based on the group name.
Group names are suggestions and can differ from user to user.
Name | Description |
---|---|
infield_dev_location_viewers | Users in the group can view but not edit checklists in the specified location (location ) and environment (dev ). |
infield_dev_location_checklist_admins | Users in this group can create, update, delete, and approve checklists in the specified location (location ) and environment (dev ). |
infield_dev_location_template_admins | Users in this group can create, update, and delete templates in the specified location (location ) and environment (dev ). |
infield_dev_location_checklist_users | Users in this group can work with checklists and create observations in the specified location (location ) and environment (dev ). |
Assign the following group capabilities:
Capability type | Action | Scope | Description |
---|---|---|---|
Groups | groups:read , groups: list | All | View user groups. |
Data models | dataModel:read | cdf_cdm , cdf_idm , APM_Config, cdf_infield, cdf_apps_shared , idm_customer_datamodel_space - where you can extend the views if necessary | View and analyze the data created in InField. |
Data model instances | dataModelInstance:read | APM_Config, cognite_app_data, location_app_data_space, location_source_data_space - a list of spaces to read the data from; cdf_cdm_units - a space to use units for time series. Add all such spaces you want to read the data from to the scope. | View and analyze the data created in InField. |
Data model instances | dataModelInstance:write | cognite_app_data | Access and edit data organized in data models and spaces. |
Data model instances | dataModelInstance:write_properties | Spaces with time series instances | Access, create and edit time series data. |
Location filters | locationfilters:read | All | View locations in InField. |
Create data modeling spaces
InField stores asset data in data models. You need to create at least 4 spaces to store your data and data models.
Space name | Description |
---|---|
cognite_app_data | This space holds user data, such as user profiles. |
APM_Config | This space holds configurations in Asset Performance Management (APM). |
yourRootLocation_source_data | This space holds data from your source systems (like SAP) for one root location. Replace yourRootLocation with the name of your root location/asset. |
yourRootLocation_app_data | This space holds data created in InField (like checklists and templates) for one root location. Replace yourRootLocation with the name of your root location/asset. |
ApmAppData | You don't need to set up or change this space. ApmAppData is a system data model that's present in all projects by default. The data model has the System tag. |
Create a unique pair of _source_data
and _app_data
spaces for each root location you want to configure in InField. For example, if you have two root locations named plant-a
and plant-b
, you will need to create four spaces in total:
plant-a_source_data
plant-a_app_data
plant-b_source_data
plant-b_app_data
You can create spaces in the following ways:
- With the Cognite Python SDK.
- With the Cognite API.
- 2 location spaces directly in InField.
Spaces created with SDK
You can create the spaces using Cognite Python SDK. Use the following Python code and replace yourRootLocation
with your root location/asset name in yourRootLocation_source_data
, yourRootLocation_app_data
.
Create spaces
from cognite.client.data_classes.data_modeling import SpaceApply
# List of spaces to create
spaces_to_create = ["yourRootLocation_source_data", "yourRootLocation_app_data", "APM_Config", "cognite_app_data"]
# Apply spaces
for space_name in spaces_to_create:
client.data_modeling.spaces.apply(SpaceApply(space=space_name))
Spaces created with API
You can create the spaces using the API endpoint:
cognite_app_data
APM_Config
yourRootLocation_source_data
yourRootLocation_app_data
Use the same names for the space
and name
attributes. The space
attribute is also the space ID.
Replace yourRootLocation
with your root location/asset name in yourRootLocation_source_data
, yourRootLocation_app_data
.
APM_Config
is the space that you can create manually in CDF or automatically by running the script. You create this space by creating corresponding data model.
Spaces created in InField
To create location spaces in InField:
- Sign in to
InFieldand select ⚙ > location to which you want to add spaces. - On the Customer instance spaces tab, select the space from the list or enter the name of the space, for example,
yourRootLocation_source_data
and press Enter. - On the InField instance spaces tab, select the space from the list or enter the name of the space, for example,
yourRootLocation_app_data
and press Enter.
Configure locations
Users need admin rights to configure locations.
The Locations page lists your root locations. Root location is a root asset that's at the top of the asset hierarchy. The root asset is a digital representation of a site, such as an oil platform, a plant, or an installation. Each site in InField should have a root location. For each location you want to be available in InField, complete the configuration in the InField application.
- Sign in to
InField, select (⚙) > + Add location. - Enter the name and the description and select Add.
- Select the location to complete configuration.
Location details
Update the name and description of your location.
View mappings
Views contain a group of properties that you can change for specific cases. By default, InField uses the Cognite process industries data model that extends the core data model to meet the needs of the process industries. You can customize entity definitions (or views), such as CogniteAsset
and CogniteMaintenanceOrder
by extending them with properties that are specific to your operations. For example, to extend the CogniteMaintenanceOrder
property, you can create a new view and add the Cost
field to this property.
In InField, you can select the entities you want to use, such as activities, assets, etc., with views defined in the cdf_idm
(Process industries data model), cdf_cdm
(Core data model) spaces, or the space where you store your custom views.
Data entity | View | Extendable |
---|---|---|
Asset | cdf_cdm.CogniteAsset | Yes |
Activity (work orders) | cdf_idm.CogniteMaintenanceOrder | Yes |
Operations | cdf_idm.CogniteOperations | Yes |
Notifications | cdf_idm.CogniteNotification | Yes |
Files (P&IDs) | cdf_cdm.CogniteFile | No |
Annotations (file Contextualization) | cdf_cdm.CogniteDiagramAnnotation (edge) | No |
3D | Ingested through 3D APIs | No |
To configure the views you want to use:
- Go to Locations > View mappings.
- For each property, select either the default space or the space where you created custom views. In the current implementation, you can configure view mappings of 4 entities only.
- Save to apply the changes.
Make sure the view version always matches the data model version. Otherwise, the table on the Overview page won't work correctly.
Each entity type, such as activity, asset, etc., has a standard view defined in the cdf_idm
system space. To view and customize views, go to CDF > Data management > Data models > find and select CogniteProcessIndustries.
Customer instance space
Select the space to store data on assets, work orders, notifications, and other data coming from a customer source system, such as SAP, for a particular location. Currently, you can select only one space.
InField instance space
Select the space to store data on templates, checklists, and observations created in the application for a particular location.
Asset explorer
To display related data, such as work orders, time series, and documents on the Asset explorer page, ensure these data objects are connected to the corresponding assets in Cognite Data Fusion. InField uses these relationships to find and display the relevant information for each asset.
Data object | Requirements |
---|---|
3D | The CogniteAsset.object3D property needs to have a 3D model linked to the asset in the source_instance_space . |
Trends (time series) | The CogniteTimeSeries.assets property needs to have a direct relation to the asset in either the app_instance_space or source_instance_space of the current location. |
Documents | The CogniteFile.assets property needs to have a direct relation to the asset in either the app_instance_space or source_instance_space of the current location. |
Work orders | The CogniteMaintenanceOrder.mainAsset property needs to have a direct relation to the asset in the source_instance_space of the current location. |
Notifications | The CogniteNotification.asset property needs to have a direct relation to the asset in the source_instance_space of the current location. |
Properties | The CogniteAsset view needs to be extended with any custom properties you want to display for the asset. |
Media | The CogniteFile.assets property needs to have a direct relation to the asset in either the app_instance_space or source_instance_space . Supported file types in CogniteFile.mimeType include "video/quicktime", "video/mp4", "image/jpeg", and "image/png". |
Make sure to contextualize files to the relevant asset to see them on the asset's card.
To test the location you just configured:
-
In the top right, select your profile > Manage account > Select location.
-
From the list, select the location you just created.
Once the application reloads, you can work in your new location.