I have a use case where I need to retrieve all Cognite Functions and perform operations on a subset of them based on specific criteria. To achieve this, I want to use the metadata field in Cognite Functions as a filtering mechanism. However, the current limitation in the Cognite Functions API does not allow updating metadata for existing functions or adding metadata to functions that were created without it.
Current Limitation
Currently, the only way to modify metadata for a function is to delete and re-upload the function. This approach has significant drawbacks:
- Loss of Schedules: Deleting a function also deletes any associated schedules, which need to be recreated manually.
- Loss of History: Run history is also lost upon re-uploading, impacting the ability to analyze past runs.
Proposed Feature
Introduce functionality in the Cognite Functions API that allows:
- Updating the metadata field for existing functions.
- Adding metadata to existing functions that do not have metadata.
Benefits
- Improved Filtering: Users can dynamically tag or categorize functions with metadata and retrieve only relevant ones for specific operations.
- Preservation of Schedules and History: Avoids the need to delete and recreate functions, preserving associated schedules and run history.
- Enhanced Flexibility: Makes Cognite Functions more adaptable to evolving use cases without requiring disruptive workflows.
Use Case Example
In my use case, I would use metadata to tag functions based on their purpose (e.g., [CALC], [ANALYTICS]) and filter them efficiently. The inability to update/add metadata on existing Cognite function prevents me from easily maintaining and managing my function.
Check the
documentation
Ask the
Community
Take a look
at
Academy
Cognite
Status
Page
Contact
Cognite Support