Setup and administration
The Functions service provides a scalable, secure, and automated way to host and run the Python code.
The Python code can range from basic operations and data transformations to deploying advanced machine learning models. For example, you can use Functions to:
- Preprocess data, transform and validate data, convert data to the same unit, and detect deviation from estimated production.
- Convert from simple to complex calculations: interpolation, production trends, computing gas rates, generating alarms based on events.
- Create statistical models for forecasting oil/water separation and time series smoothing.
Before you start
-
Make sure you have registered the Cognite API and the Cognite Data Fusion (CDF) application in Microsoft Entra ID and set up Microsoft Entra ID and CDF groups.
-
You must also have the Python SDK installed in your environment if you want to create functions using the SDK.
-
To use functions, a user or an application must be a member of a CDF group with these capabilities:
functions:write
: to create, call and schedule functions.functions:read
: to retrieve and list functions, retrieve function responses and function logs.files:read
: to create functions.files:write
: to create functions.sessions:create
: to call and schedule functions.
Read more about capabilities.
Activate Cognite Functions in CDF
Before creating a Cognite Function, you may have to activate functions in CDF.
- Navigate to Data management > Build solutions > Functions.
-
If you see the warning:
Cognite Functions is not activated for the project
, select Activate to request activation. -
If you see the Upload function button, your project is already activated for Cognite Functions.
Activation can take up to two hours. The Activation in progress message will be shown until the process has been completed.
- The Upload function button is available when the activation is completed.
You can now create Cognite Functions using CDF, the Functions API, or the Python SDK.