Symptom
Replication flow fails with following error:
Error message: "Schema validation failed. Please ensure the primary key of the source table matches the primary key definition of the input schema derived from the source table or the transform. Expected column XX at index X in the source table primary key but found XXXXX. Expected column XXXXX at index X in the source table primary key but found XXXXX"
Environment
SAP Datasphere
Reproducing the Issue
Execute replication flow
Cause
The issue may be caused by one the following reason:
- The replication flow requires the connectivity user schema to exist in the source system to store internal objects for delta replication.
- Database triggers must be created in the same schema as the source tables, and the connectivity user must have the necessary privileges to create these triggers.
Resolution
- Ensure that the source system has a schema with the same name as the user specified in the SQL Server connection.
- If the schema is missing, request the database administrator to create it and grant the necessary write privileges to the connectivity user.
- Verify that the triggers are created in the correct schema and that the connectivity user has the required privileges.
See Also
The text used in the See Also section is incorrect. For SAP Notes, Community and SAP Help, we use the below:
- SAP Help - Replication Flow Blog Series Part 1 – Overview .
- SAP Help - Add the Source for a Replication Flow.
- SAP Help - Define Mappings in a Replication Flow .
- SAP Note - 2984828 - Documentation updates for replication flow prerequisites.
Keywords
failure, database schema mismatch, connectivity, user schema, delta replication, validation, replication artifacts, artifacts, DS, RF. , KBA , DS-DI-RF , Replication Flow Runtime , Problem
SAP Knowledge Base Article - Public