Skip to content

[CDF-28463] Map Observation startTime from node.createdTime in infield-data migration - #3146

Merged
Magssch merged 1 commit into
mainfrom
cdf-28463/map-observation-start-time-from-created-time
Aug 13, 2026
Merged

[CDF-28463] Map Observation startTime from node.createdTime in infield-data migration#3146
Magssch merged 1 commit into
mainfrom
cdf-28463/map-observation-start-time-from-created-time

Conversation

@Magssch

@Magssch Magssch commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

View-to-view containerMapping can now map one source property to multiple destination properties. Subsequently used by cdf migrate infield-data such that Observation node.createdTime is now written to both sourceCreatedTime and startTime ("Observed At") since the same source property as the bext proxy for both targets.

Bump

  • Patch
  • Skip

Changelog

Improved

  • [alpha] When running cdf migrate infield-data, FieldObservation will now have it's startTime/Observed At property populated based on the source Observation instance by default..

@Magssch
Magssch requested review from a team as code owners August 13, 2026 12:07
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@Magssch

Magssch commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the view-to-view mapping logic to support mapping a single source property to multiple destination properties. The container_mapping attribute now accepts a list of strings, and the conversion logic has been updated to iterate over all mapped destination properties. Unit tests and configuration examples have been added to verify this new behavior. I have no feedback to provide as the changes are well-implemented and fully tested.

@github-actions

Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
44877 38658 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/resource_classes/view_to_view_mapping.py 88% 🟢
cognite_toolkit/_cdf_tk/commands/_migrate/conversion.py 83% 🟢
TOTAL 86% 🟢

updated for commit: c37f279 by action🐍

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.80952% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.14%. Comparing base (b682012) to head (c37f279).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...te_toolkit/_cdf_tk/commands/_migrate/conversion.py 65.62% 11 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3146   +/-   ##
=======================================
  Coverage   86.13%   86.14%           
=======================================
  Files         481      481           
  Lines       44870    44877    +7     
=======================================
+ Hits        38648    38658   +10     
+ Misses       6222     6219    -3     
Files with missing lines Coverage Δ
...tk/client/resource_classes/view_to_view_mapping.py 88.00% <100.00%> (+2.28%) ⬆️
...te_toolkit/_cdf_tk/commands/_migrate/conversion.py 83.28% <65.62%> (+0.36%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Magssch
Magssch merged commit 3cbc2d4 into main Aug 13, 2026
15 checks passed
@Magssch
Magssch deleted the cdf-28463/map-observation-start-time-from-created-time branch August 13, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants