Skip to main content
Committed ⭐️⭐️⭐️
August 11, 2026
Question

PI Extractor - Backfilling issues

  • August 11, 2026
  • 5 replies
  • 54 views

Hello!

We have encountered some issues with backfilling on the PI Extractor. This usually goes automatically, and works fine. However, we do now have a 2 day gap in data on Cognite, however all that data is present in PI.

Are there any way to “force” a backfill, or fix this issue somehow?

Thanks!

 

    5 replies

    Mithila Jayalath
    Expert ⭐️⭐️⭐️⭐️
    Expert ⭐️⭐️⭐️⭐️
    August 11, 2026

    @gorankarlsen can you try out Cognite PI Replace Utility. It allows you to target a specific date range, optionally delete the "straight-line" gap in CDF, and re-ingest the actual historical data from your PI Server.

    Here is a configuration template:

    version: 2
    cognite:
    project: <your-project>
    idp-authentication:
    tenant: ${COGNITE_TENANT_ID}
    client-id: ${COGNITE_CLIENT_ID}
    secret: ${COGNITE_CLIENT_SECRET}
    scopes:
    - ${COGNITE_SCOPE}
    time-series:
    external-id-prefix: "pi:" # Ensure this matches your PI extractor's prefix
    pi:
    host: ${PI_HOST}
    username: ${PI_USER}
    password: ${PI_PASS}
    replace:
    start-time: "<gap-start-time>"
    end-time: "<gap-end-time>"
    delete-data-points: true # Deletes the straight-line gap in CDF before re-ingestion
    include-tags:
    - "<YOUR_TAG_1>"
    - "<YOUR_TAG_2>"

    Recommended steps:

    1. Dry-run first: Add dry-run: true to the replace block and run PiExtractor.exe replace -f <your_config_file>.yml. This will compare PI data with CDF data and log differences without making any changes.

    2. Execute: Once you've verified the dry-run output, set dry-run: false (or remove the line) and run the command again to perform the actual replacement. 

    Committed ⭐️⭐️⭐️
    August 12, 2026

    @Mithila Jayalath  Hello! Thank you for posing this. I have now tried replace, but receiving some sort of error. Also, seems like this does not work for config version 3. Any other workarounds for this matter?

     

    Yaseen Ahmed Khan
    Practitioner ⭐️⭐️⭐️
    Practitioner ⭐️⭐️⭐️
    August 12, 2026

    Hi ​@gorankarlsen,
    PI Replace accepts version: 2 , and the main extractor takes the version: 3 
    So, changing the version to 2 as mentioned in ​@Mithila Jayalath’s configuration template should resolve that error.
    Please let us know if it worked once you test it out. 
    Thanks!

    Committed ⭐️⭐️⭐️
    August 13, 2026

    Hello! ​@Yaseen Ahmed Khan ​@Mithila Jayalath 

    Thank you for the support. I tried editing to version 2. I now did not receive any error in the command prompt; however, no data was backfilled in cognite. Not sure where this goes wrong for me; as this should automatically backfill by default?

    Yaseen Ahmed Khan
    Practitioner ⭐️⭐️⭐️
    Practitioner ⭐️⭐️⭐️
    August 13, 2026

    ​Hello @gorankarlsen 
    Could you confirm if the dry-run is set to false and the start-time/end-time matches your actual gap period. Could you also share the configuration along with the log ? 
    Thanks