Skip to content

Source system modules for Foundation DP#274

Open
Aashutosh-cognite wants to merge 18 commits into
mainfrom
foundational-dp
Open

Source system modules for Foundation DP#274
Aashutosh-cognite wants to merge 18 commits into
mainfrom
foundational-dp

Conversation

@Aashutosh-cognite
Copy link
Copy Markdown
Contributor

@Aashutosh-cognite Aashutosh-cognite commented May 20, 2026

Summary

Introduces the Layer 1 source system modules for dp:foundation. Each module is self-contained - no shared foundation module required - and ships a production-grade extractor configuration template alongside the CDF resources needed to start ingesting on day one.

Added

  • cdf_pi_foundation — OSIsoft PI .NET Extractor. Writes timeseries directly to CDF with no RAW staging. Extractor config uses space-id to write ExtractorTimeSeries instances straight into the DM instance space.

  • cdf_opcua_foundation — OPC-UA Extractor. Timeseries values go direct to CDF; node browse metadata and state caches land in RAW (db_{{location}}_opcua).

  • cdf_sap_foundation — SAP OData Extractor. Lands functional locations, equipment, work orders, work packages, work tasks, and notifications into seven RAW tables in db_{{location}}_sap. Includes a state store table for delta tracking.

  • cdf_db_foundation — DB Extractor (ODBC). RAW landing for relational databases (PostgreSQL, MSSQL, Oracle, MySQL). Config template uses PostgreSQL as the example.

  • cdf_files_foundation — SharePoint Extractor. Ingests files from SharePoint into CDF Files.

    Test Plan

    • Deploy each module independently to a dev CDF project and confirm all resources are created without errors
    • Verify extraction pipeline appears in Fusion and remote config is correctly pushed for each module
    • For cdf_sap_foundation: confirm all seven RAW tables are created in db_{{location}}_sap
    • For cdf_pi_foundation and cdf_opcua_foundation: confirm no RAW database is created (direct-write only)

@gemini-code-assist
Copy link
Copy Markdown

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.

@Aashutosh-cognite
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

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

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 introduces the Foundation Deployment Pack (dp:foundation), providing a modular architecture for CDF projects with pre-configured modules for PI, OPC-UA, SAP, DB, and file ingestion. Feedback focuses on ensuring all identifiers and prefixes are properly parameterized using Toolkit variables to avoid hardcoding. Several potential bugs were identified regarding inconsistent casing and typos in SAP OData filters. Security improvements are required for the example notebook to restrict overly broad 'WRITE' permissions, and the notebook module ID must be updated to follow the snake_case naming convention.

sap_service: ZGW_GETEQIP_SRV # verify service name in your SAP NW Gateway
sap_entity: EquipmentListSet
sap_key: [Equipment]
filter: "Maintplant eq '{{sapPlant}}'"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The filter property Maintplant has inconsistent casing compared to MaintPlant used for FunclocListSet (line 62). This is likely a typo and may cause filtering to fail if the OData service expects consistent casing. Please verify the correct property name from the SAP service metadata and use it consistently.

      filter: "MaintPlant eq '{{sapPlant}}'"

sap_service: ZPM_NOTI_EXTRACT_DATA_SRV # verify service name in your SAP NW Gateway
sap_entity: ExNotifheader
sap_key: [NotifNo]
filter: "Mainplant eq '{{sapPlant}}'"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The filter property Mainplant appears to be a typo and is inconsistent with MaintPlant used for other entities. This will likely cause the filter for notifications to fail. Please verify the correct property name from the SAP service metadata.

      filter: "MaintPlant eq '{{sapPlant}}'"

Comment thread modules/tools/notebooks/cdf_queries/auth/notebook.cdf_query_example.Group.yaml Outdated
Comment thread modules/tools/notebooks/cdf_queries/module.toml Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@valnaumova
Copy link
Copy Markdown
Contributor

Please split this PR into several:

  1. One per data source
  2. The part related to notebook: please justify why it is needed in the DP where we agreed not to include extra things

@Aashutosh-cognite Aashutosh-cognite requested a review from a team as a code owner May 21, 2026 04:13
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.

3 participants